Authentication#
HTTP Authentication, scheme: bearer
Auth Mangment#
POST Get User Token#
This endpoint allows you to create a new user account in your application by providing the required registration details. You cannot use our APIs without a valid token. The token must belong to the same user who will be making the API calls — not a user who is simply assigned to a team, for example.{
"externalUserId": "1"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| body | body | object | no | none |
| » externalUserId | body | string | yes | The external user ID you want to associate with your user account. |
{
"success": true,
"data": {
"accessToken": "string",
"refreshToken": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Validation failed",
"details": [
"email must be an email",
"name should not be empty",
"password should not be empty"
]
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 400,
"path": "/api/v1/auth/token"
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 401,
"path": "/api/v1/auth/token"
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Tenant not found"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 404,
"path": "/api/v1/auth/token"
}
{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 500,
"path": "/api/v1/auth/token"
}
Responses#
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» accessToken | string | true | none | | Access token avaliable for 1 hour |
| »» refreshToken | string | true | none | | Refresh token avaliable for 1 day |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (e.g., BAD_REQUEST) |
| »» message | string | true | none | | Error message |
| »» details | array | false | none | | Validation error details |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (e.g., UNAUTHORIZED) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (e.g., NOT_FOUND) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (e.g., INTERNAL_ERROR) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
GET Refresh User Token#
This api used to refresh user access token , attach Refresh token as authorization header to get new access tokenParams#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (Refresh token) |
{
"success": true,
"data": {
"accessToken": "string"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» accessToken | string | true | none | | New access token |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
Workspace Mangment#
POST Create Workspace#
Here you can create workspace for a user by user email{
"enterpriseId": "1",
"workspaceName": "New Workspace"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » workspaceName | body | string | yes | The Workspace Name |
| » enterpriseId | body | string | yes | Your EnterpriseID |
{
"success": true,
"data": {
"id": "string",
"name": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Workspace already exists with the same enterpriseId"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 400,
"path": "/api/v1/workspace"
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 401,
"path": "/api/v1/workspace"
}
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 403,
"path": "/api/v1/workspace"
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Tenant not found"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 404,
"path": "/api/v1/workspace"
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
| 400 | Bad Request | Invalid request data. Please check your input and try again. | Inline |
| 401 | Unauthorized | Missing or invalid API key. Please include a valid x-api-key header. | Inline |
| 403 | Forbidden | Missing or invalid authorization token. Please include a valid Bearer token in the Authorization header. | Inline |
| 404 | Not Found | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Workspace ID |
| »» name | string | true | none | | Workspace name |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (BAD_REQUEST) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (UNAUTHORIZED) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (FORBIDDEN) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (NOT_FOUND) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
GET Get single workspace#
Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | enterpriseId |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"id": "string",
"name": "string",
"admin": {
"externalUserId": "string"
},
"enterpriseId": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Workspace ID |
| »» name | string | true | none | | Workspace name |
| »» admin | object | true | none | | Admin user info |
| »»» externalUserId | string | true | none | | Admin external user ID |
| »» enterpriseId | string | true | none | | Enterprise identifier |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
PATCH Update Workspace#
Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | enterpriseId |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » name | body | string | no | The new name of the workspace (optional) |
{
"success": true,
"data": {
"id": "string",
"name": "string",
"adminId": "string",
"enterpriseId": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Workspace ID |
| »» name | string | true | none | | Workspace name |
| »» adminId | string | true | none | | Admin user ID |
| »» enterpriseId | string | true | none | | Enterprise identifier |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
DELETE Delete Workspace#
Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | enterpriseId |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": null,
"message": "Workspace deleted successfully with its teams",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | null | true | none | | Response data (null for delete operations) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
PATCH Change Workspace Admin#
PATCH /workspace/{enterpriseId}/change-adminParams#
| Name | Location | Type | Required | Description |
|---|
| enterpriseId | path | string | yes | Enterprise ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » adminId | body | string | yes | The external user ID of the new admin |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
Team Mangment#
POST Create Team#
This endpoint is used to create new team under specific workspace (Enterprise). Only workspace admin can create teams.{
"enterpriseId": "2",
"name": "New Team"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » enterpriseId | body | string | yes | Enterprise ID (workspace identifier) |
| » name | body | string | yes | Team name |
{
"success": true,
"data": {
"id": "string",
"name": "string",
"isDefault": false,
"createdAt": "string",
"updatedAt": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Team ID |
| »» name | string | true | none | | Team name |
| »» isDefault | boolean | true | none | | Whether this is the default team |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Get Workspace Teams#
This endpoint is used to get specific workspace(Enterprise) teams. Only workspace admin can access this endpoint.Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » enterpriseId | body | string | yes | Enterprise ID (workspace identifier) |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"isDefault": false,
"createdAt": "string",
"updatedAt": "string",
"TeamMembers": [
{
"id": "string",
"role": "string",
"createdAt": "string",
"updatedAt": "string",
"user": {
"externalUserId": "string"
}
}
]
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of teams |
| »» id | string | true | none | | Team ID |
| »» name | string | true | none | | Team name |
| »» isDefault | boolean | true | none | | Whether this is the default team |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| »» TeamMembers | array | true | none | | Team members array |
| »»» id | string | true | none | | Team member ID |
| »»» role | string | true | none | | Member role (ADMIN or MEMBER) |
| »»» createdAt | string | true | none | | Creation timestamp |
| »»» updatedAt | string | true | none | | Last update timestamp |
| »»» user | object | true | none | | User information |
| »»»» externalUserId | string | true | none | | External user ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Assign member#
POST /teams/{teamId}/membersThis endpoint is used to assign new member(s) to the team. This can be done by team admin only. If a single member is provided, returns 201. If multiple members are provided, returns 200 with success/failed arrays.{
"members": [
{
"externalUserId": "Team-Admin-1",
"role": "ADMIN"
},
{
"externalUserId": "Team-Member-1",
"role": "MEMBER"
},
{
"externalUserId": "Team-Member-2",
"role": "MEMBER"
},
{
"externalUserId": "Team-Member-3",
"role": "MEMBER"
}
]
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » members | body | [object] | yes | Array of members to assign |
| »» externalUserId | body | string | yes | External user ID |
| »» role | body | string | yes | Member role (ADMIN or MEMBER) |
{
"success": true,
"data": {
"id": "string",
"role": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
200 Response (Multiple members with some failures)
{
"success": true,
"data": {
"successful": [
{
"externalUserId": "string",
"teamMember": {
"id": "string",
"role": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
],
"failed": [
{
"externalUserId": "string",
"error": "User already assigned to this team"
}
],
"summary": {
"total": 2,
"successCount": 1,
"failureCount": 1
}
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
HTTP Status Code 201 (Single member)| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Team member data |
| »» id | string | true | none | | Team member ID |
| »» role | string | true | none | | Member role |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
HTTP Status Code 200 (Multiple members)| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Batch operation result |
| »» successful | array | true | none | | Successfully assigned members |
| »»» externalUserId | string | true | none | | External user ID |
| »»» teamMember | object | true | none | | Team member data |
| »» failed | array | true | none | | Failed assignments |
| »»» externalUserId | string | true | none | | External user ID |
| »»» error | string | true | none | | Error message |
| »» summary | object | true | none | | Operation summary |
| »»» total | integer | true | none | | Total members processed |
| »»» successCount | integer | true | none | | Number of successful assignments |
| »»» failureCount | integer | true | none | | Number of failed assignments |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get team members#
GET /teams/{teamId}/membersThis endpoint is used to get team members. Any team member (ADMIN or MEMBER) can view team members.Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": [
{
"id": "string",
"role": "string",
"userId": "string",
"createdAt": "string",
"updatedAt": "string",
"user": {
"externalUserId": "string"
}
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of team members |
| »» id | string | true | none | | Team member ID |
| »» role | string | true | none | | Member role |
| »» userId | string | true | none | | User ID |
| »» createdAt | string | true | none | | Creation timestamp |
| »» updatedAt | string | true | none | | Last update timestamp |
| »» user | object | true | none | | User information |
| »»» externalUserId | string | true | none | | External user ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
DELETE Remove Team Members#
DELETE /teams/{teamId}/membersThis endpoint is used to remove member(s) from the team. Only team admin can remove members. Supports both single and multiple member removal.{
"members": ["external-user-id-1", "external-user-id-2"]
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » members | body | [string] | yes | Array of external user IDs to remove |
{
"success": true,
"data": null,
"message": "Member(s) removed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | null | true | none | | Response data (null for delete operations) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get Team By ID#
This endpoint is used to get team informations by id. Any team member (ADMIN or MEMBER) can view team details.Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"id": "string",
"name": "string",
"isDefault": false,
"workspace": {
"name": "string",
"enterpriseId": "string"
},
"TeamMembers": [
{
"id": "string",
"role": "string",
"user": {
"externalUserId": "string"
}
}
]
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Team ID |
| »» name | string | true | none | | Team name |
| »» isDefault | boolean | true | none | | Whether this is the default team |
| »» workspace | object | true | none | | Workspace information |
| »»» name | string | true | none | | Workspace name |
| »»» enterpriseId | string | true | none | | Enterprise identifier |
| »» TeamMembers | array | true | none | | Team members array |
| »»» id | string | true | none | | Team member ID |
| »»» role | string | true | none | | Member role |
| »»» user | object | true | none | | User information |
| »»»» externalUserId | string | true | none | | External user ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
PATCH Update Team Name#
This endpoint is used to update team name. Only team admin can update team name.{
"name": "Updated Name"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » name | body | string | yes | New team name |
{
"success": true,
"data": {
"id": "string",
"name": "Updated Name"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Team ID |
| »» name | string | true | none | | Updated team name |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
DELETE Delete Team#
This endpoint is used to delete team. Only workspace admin can delete teams.Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": null,
"message": "'Team Team Name' deleted successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | null | true | none | | Response data (null for delete operations) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
Connection#
GET Get All Connections#
Fetches all connections for the tenant. Only team admin can access this endpoint.Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"success": true,
"count": 2,
"data": [
{
"id": "string",
"platform": "meta",
"adsAccounts": []
}
]
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» success | boolean | true | none | | Operation success |
| »» count | integer | true | none | | Number of connections |
| »» data | array | true | none | | Array of connections |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Create Connection#
Generates an authorization URL for connecting an external platform (e.g., Meta, Google Ads, etc.). Automatically assigns a team if not provided. Only team admin can create connections.{
"platform": "meta",
"workspaceId": "{{workspace-id}}",
"teamId": "{{team-id}}",
"redirect": "https://example.xxx"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » platform | body | string | yes | Platform name (meta, google, etc.) |
| » workspaceId | body | string | no | Workspace ID (optional, used to auto-select default team) |
| » teamId | body | string | no | Team ID (optional, auto-selected if workspaceId provided) |
| » redirect | body | string | no | Your redirect URL |
{
"authUrl": "https://www.facebook.com/v21.0/dialog/oauth?client_id=779794021555530&redirect_uri=https%3A%2F%2Fc1223cc09a3f.ngrok-free.app%2Fapi%2Fv1%2Fmeta%2Fredirect%2Fcallback&state=%7B%22tenantId%22%3A%22c71972e1-b6a6-429a-9c21-0bde821c9305%22%2C%22teamId%22%3A%22783e5cdb-a008-4663-be7b-1016fb0e6408%22%7D&scope=ads_management,ads_read,pages_show_list&response_type=code"
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » authUrl | string | true | none | | This is the authorization URL generated by the selected advertising platform (e.g., Meta, TikTok, Google, etc.). |
GET Get connections by teamId#
GET /connections/team/{teamId}Fetches all connections associated with a specific team. Only team admin can access this endpoint.Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET List of ad accounts and their connection statuses.#
Returns a list of all ad accounts and their current connection status with external platforms. Only team admin can access this endpoint.Params#
| Name | Location | Type | Required | Description |
|---|
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"connected": [
{
"platform": "meta",
"connected": true,
"ads_accooun_id": "string",
"account_name": "string"
}
]
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» connected | array | true | none | | Array of connection statuses |
| »»» platform | string | true | none | | Platform name |
| »»» connected | boolean | true | none | | Connection status |
| »»» ads_accooun_id | string | true | none | | Ad account ID |
| »»» account_name | string | true | none | | Account name |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
DELETE Delete connection#
DELETE /connections/{adsaccountid}/remove-connectionRemoves the connection associated with the specified ad account. Only team admin can remove connections.Params#
| Name | Location | Type | Required | Description |
|---|
| adsaccountid | path | string | yes | Ad account ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"tenantId": "e7cedb00-ec7a-454e-8b43-2a0da079c132",
"adsAccountId": "495dcbd5-b01f-4012-9c44-340915074abc",
"deletedConnections": 0,
"deletedAdsAccount": true
},
"message": "Ads account 495dcbd5-b01f-4012-9c44-340915074abc removed successfully.",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» tenantId | string | true | none | | Tenant ID |
| »» adsAccountId | string | true | none | | Ad account ID |
| »» deletedConnections | integer | true | none | | Number of deleted connections |
| »» deletedAdsAccount | boolean | true | none | | Whether ad account was deleted |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
DELETE Disconnect#
DELETE /connections/{connectionId}/disconnectDeletes the connection and all related data (ads accounts, tokens, etc.) for the specified connection ID. Only team admin can disconnect connections.Params#
| Name | Location | Type | Required | Description |
|---|
| connectionId | path | string | yes | Connection ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"deleted": { ... }
},
"message": "Connection uuid and all related data deleted successfully.",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» deleted | object | true | none | | Deleted connection details |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get insights#
GET /connections/{id}/insightsGets insights for a specific ad account connection. Team members (ADMIN or MEMBER) can access this endpoint.Params#
| Name | Location | Type | Required | Description |
|---|
| id | path | string | yes | Ad account ID |
| start_date | query | string | yes | Start date (YYYY-MM-DD format) |
| end_date | query | string | yes | End date (YYYY-MM-DD format) |
| metrics | query | string | yes | Comma-separated list of metrics (e.g., "impressions,clicks,spend") |
| breakdown | query | string | no | Breakdown dimension (optional) |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": {
"impressions": 10000,
"clicks": 500,
"spend": 250.0
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Insights data (varies by metrics requested) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
Ads Account Mangment#
POST Assign ad account#
POST /{teamId}/ads-accounts/assignThis endpoint is used to give permission to one of your team members to specific ad account. Only team admin can assign ad accounts.{
"adAccountId": "string",
"externalUserId": "string",
"permission": "MANAGER"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » adAccountId | body | string | yes | Ad account ID (from Meta/Google) |
| » externalUserId | body | string | yes | External user ID |
| » permission | body | string | yes | Permission level (MANAGER or VIEWER) |
Enum#
| Name | Value |
|---|
| » permission | MANAGER |
| » permission | VIEWER |
{
"success": true,
"data": {
"id": "string",
"permission": "string",
"updatedAt": "string",
"createdAt": "string",
"adsAccount": {
"accountId": "string"
}
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
Responses#
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | Permission ID |
| »» permission | string | true | none | | Permission level (MANAGER or VIEWER) |
| »» updatedAt | string | true | none | | Last update timestamp |
| »» createdAt | string | true | none | | Creation timestamp |
| »» adsAccount | object | true | none | | Ad account information |
| »»» accountId | string | true | none | | Ad account ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always false for error responses |
| » error | object | true | none | | Error details |
| »» code | string | true | none | | Error code (INTERNAL_ERROR) |
| »» message | string | true | none | | Error message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
| » path | string | false | none | | Request path |
POST Revoke ad account#
POST /{teamId}/ads-accounts/revokeThis endpoint is used to revoke ad account permission for specific user in a team. This can be done by team admin only.{
"adAccountId": "string",
"externalUserId": "string"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » adAccountId | body | string | yes | The ad account ID given by Google or Facebook |
| » externalUserId | body | string | yes | The external user ID that will lose the permission |
{
"success": true,
"data": null,
"message": "Ad account revoked from member successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | null | true | none | | Response data (null for revoke operations) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Change ad account#
POST /{teamId}/ads-accounts/change-permissionThis endpoint is used to change permission for team member permission to specific ad account. This can be done by team admin only.{
"adAccountId": "act_483489024830589",
"externalUserId": "1",
"permission": "VIEWER"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » adAccountId | body | string | yes | Ad account ID |
| » externalUserId | body | string | yes | External user ID |
| » permission | body | string | yes | New permission level (MANAGER or VIEWER) |
Enum#
| Name | Value |
|---|
| » permission | MANAGER |
| » permission | VIEWER |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Import#
GET /{teamId}/meta/importHere you can Import your ad account data (campaigns, adset, ads) , make faster retrival and less rate limiting.Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team id |
| adAccountId | query | string | no | You facebook ad account id |
| x-api-key | header | string | no | none |
{
"success": true,
"data": { ... },
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data (varies by endpoint) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Facebook pages#
Here you can get your Facebook pages IDs.Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| adAccountId | query | string | no | Your Facebook ad account ID |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
{
"success": true,
"data": { ... },
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data (varies by endpoint) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Targeting Search#
POST /{teamId}/meta/targeting/searchSearch for targeting options (locations, interests, behaviors, etc.) for Meta ad campaigns.{
"type": "location",
"query": "New York"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| adAccountId | query | string | no | Ad account ID (optional) |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
| body | body | object | yes | none |
| » type | body | string | yes | Targeting type (see enum below) |
| » query | body | string | yes | Search query string |
Enum#
| Name | Value |
|---|
| » type | location |
| » type | locale |
| » type | interest |
| » type | behavior |
| » type | educationSchool |
| » type | educationMajor |
| » type | workEmployer |
| » type | workPosition |
| » type | familyStatus |
| » type | lifeEvent |
| » type | industry |
| » type | income |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string"
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of targeting results |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get Ads#
Get ads for a specific ad account. Supports filtering by ad ID, campaign ID, or adset ID.Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team ID |
| adAccountId | query | string | yes | Ad account ID |
| adId | query | string | no | Specific ad ID(s), comma-separated |
| campaignId | query | string | no | Campaign ID(s), comma-separated - returns ads for these campaigns |
| adsetId | query | string | no | Adset ID(s), comma-separated - returns ads for these adsets |
| fields | query | string | no | Comma-separated list of fields to return (see enum below) |
| x-api-key | header | string | yes | The api key for your application , You can get it from our platform |
| Authorization | header | string | yes | Bearer token (JWT access token) |
Enum#
| Name | Value |
|---|
| fields | id |
| fields | adset |
| fields | bid_amount |
| fields | campaign |
| fields | campaign_id |
| fields | updated_time |
| fields | created_time |
| fields | creative |
| fields | name |
| fields | status |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string",
"campaign_id": "string",
"adset_id": "string"
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of ads |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get AdSet#
GET /{teamId}/meta/adsetsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| campaignId | query | string | no | adsets for specific campaign or campaigns |
| adsetId | query | string | no | sepcfic adset or adsets |
| fields | query | string | no | This is optional , if you dont specify fields we will return all fields |
| x-api-key | header | string | no | none |
Enum#
| Name | Value |
|---|
| fields | campaign |
| fields | adset_schedule |
| fields | name |
| fields | status |
| fields | effective_status |
| fields | billing_event |
| fields | optimization_goal |
| fields | bid_amount |
| fields | budget_remaining |
| fields | daily_budget |
| fields | lifetime_budget |
| fields | start_time |
| fields | end_time |
| fields | created_time |
| fields | updated_time |
| fields | attribution_spec |
| fields | targeting |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string",
"campaign_id": "string",
"daily_budget": 100
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of ad sets |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get AdCreative#
GET /{teamId}/meta/adcreativesParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| adcreativeId | query | string | no | none |
| fields | query | string | no | none |
| x-api-key | header | string | no | none |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"object_story_spec": { ... }
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of ad creatives |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get Insights#
GET /{teamId}/meta/insightsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| level | query | string | no | You can call campaign with any avaliable breakdown , but you can call any other combination and it will be served from meta api directly |
| breakdown | query | string | no | This breakdowns are avaliable from our db for campaign level only if you want other level it will be served from meta |
| fields | query | string | no | This fields will be served from our db directly you can call any other field from meta marketing api docs but it will be served from them directly |
| startDate | query | string | yes | none |
| endDate | query | string | yes | none |
| x-api-key | header | string | no | none |
Enum#
| Name | Value |
|---|
| level | campaign |
| level | ad |
| level | adset |
| level | account |
| breakdown | gender |
| breakdown | country |
| breakdown | age |
| breakdown | publisher_platform |
| breakdown | impression_device |
| fields | impressions |
| fields | clicks |
| fields | spend |
| fields | cpm |
| fields | cpc |
| fields | actions |
| fields | action_values |
{
"success": true,
"data": [
{
"impressions": 10000,
"clicks": 500,
"spend": 250.0,
"cpm": 25.0,
"cpc": 0.5
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of insights data (varies by level and breakdown) |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get Campaigns#
GET /{teamId}/meta/campaignsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| campaignId | query | string | no | none |
| fields | query | string | no | none |
| x-api-key | header | string | no | none |
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string",
"objective": "string"
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | array | true | none | | Array of campaigns |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
PATCH Update Campaign Status#
PATCH /{teamId}/meta/campaign/{campaignId}Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| campaignId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| x-api-key | header | string | no | none |
| Field | Type | Required | Description |
|---|
| status | enum | Yes | PAUSED or ACTIVE |
{
"success": true,
"data": {
"id": "string",
"status": "PAUSED"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Updated campaign data |
| »» id | string | true | none | | Campaign ID |
| »» status | string | true | none | | Updated status |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Create Traffic Campaign#
POST /{teamId}/meta/campaign/leadThis endpoint is used to create a campaign for leads ads. Lead generation ads are ad campaigns designed to collect contact information (like name, email, phone number) directly from users on Meta platforms without needing them to leave the app.{
"campaignName": "Traffic Campaign - Link Clicks",
"status": "PAUSED",
"budget": 100,
"adSetName": "Traffic Ad Set - Link Clicks",
"pageId": "173764419345388",
"optimizationGoal": "LINK_CLICKS",
"conversionLocation": "WEBSITE",
"creatives": {
"primaryText": "Check out our website!",
"headline": "Best Products",
"callToAction": "LEARN_MORE",
"imageUrl": "https://images.pexels.com/photos/998641/pexels-photo-998641.jpeg?cs=srgb&dl=pexels-francesco-ungaro-998641.jpg&fm=jpg",
"url": "https://example.com"
}
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| x-api-key | header | string | no | none |
| body | body | object | yes | none |
| » campaignName | body | string | yes | none |
| » status | body | string | no | Optional (default PAUSED) |
| » budget | body | integer | yes | Campaign daily budget |
| » startDate | body | string | no | must be in YYYY-MM-DD format |
| » endDate | body | string | no | must be in YYYY-MM-DD format |
| » specialAdCategories | body | [string] | no | Optional (default [NONE]) |
| » specialAdCountry | body | [string] | no | Required if specialAdCategory is not NONE |
| » adSetName | body | string | yes | none |
| » audienceId | body | [string] | no | none |
| » targeting | body | object | yes | none |
| »» genders | body | [integer] | no | Default ALL |
| »» ageMin | body | integer | no | none |
| »» ageMax | body | integer | no | none |
| »» geoLocations | body | [object] | yes | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» excludedGeoLocations | body | [object] | no | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» interests | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» behaviors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» relationshipStatuses | body | [integer] | no | none |
| »» lifeEvents | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» industries | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» income | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» familyStatuses | body | object | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationSchools | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationStatuses | body | [string] | no | none |
| »» educationMajors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workEmployers | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workPositions | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» locales | body | [number] | no | none |
| » creatives | body | object | yes | none |
| »» primaryText | body | string | yes | none |
| »» headline | body | string | yes | none |
| »» url | body | string | yes | none |
| »» callToAction | body | string | yes | none |
| »» imageUrl | body | string | yes | none |
| »» videoId | body | string | no | none |
| »» thumbnailUrl | body | string | no | none |
| »» description | body | string | no | none |
| » pageid | body | string | yes | none |
| » instagramActorId | body | string | no | Required when conversion location is Instagram Direct |
| » optimizationGoal | body | string | no | none |
| » conversionLocation | body | string | no | none |
| » appId | body | string | no | Required when conversionLocation === 'APP' |
| » objectStoreUrl | body | string | yes | Required when conversionLocation === 'APP' |
Enum#
| Name | Value |
|---|
| » status | ACTIVE |
| » status | PAUSED |
| » specialAdCategories | NONE |
| » specialAdCategories | EMPLOYMENT |
| » specialAdCategories | HOUSING |
| » specialAdCategories | CREDIT |
| » specialAdCategories | ISSUES_ELECTIONS_POLITICS |
| » specialAdCategories | ONLINE_GAMBLING_AND_GAMING |
| » specialAdCategories | FINANCIAL_PRODUCTS_SERVICES |
| »» genders | 0 |
| »» genders | 1 |
| »» genders | 2 |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »» educationStatuses | 1 |
| »» educationStatuses | 2 |
| »» educationStatuses | 3 |
| »» educationStatuses | 4 |
| »» educationStatuses | 5 |
| »» educationStatuses | 6 |
| »» educationStatuses | 7 |
| »» educationStatuses | 8 |
| »» educationStatuses | 9 |
| »» educationStatuses | 10 |
| »» educationStatuses | 11 |
| »» educationStatuses | 12 |
| »» educationStatuses | 13 |
| »» callToAction | SIGN_UP |
| »» callToAction | GET_QUOTE |
| »» callToAction | APPLY_NOW |
| »» callToAction | LEARN_MORE |
| »» callToAction | DOWNLOAD |
| »» callToAction | SUBSCRIBE |
| »» callToAction | BOOK_TRAVEL |
| » optimizationGoal | LINK_CLICKS |
| » optimizationGoal | LANDING_PAGE_VIEWS |
| » conversionLocation | WEBSITE |
| » conversionLocation | APP |
| » conversionLocation | MESSENGER |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
POST Create Sales Campaign#
POST /{teamId}/meta/campaign/salesThis endpoint is used to create a campaign for leads ads. Lead generation ads are ad campaigns designed to collect contact information (like name, email, phone number) directly from users on Meta platforms without needing them to leave the app.{
"campaignName": "Sales - Website - Landing Page Views",
"status": "PAUSED",
"budget": 100,
"adSetName": "Sales Ad Set",
"pageId": "173764419345388",
"pixelId": "1391191359009715",
"conversionEvent": "PURCHASE",
"conversionLocation": "WEBSITE",
"optimizationGoal": "LANDING_PAGE_VIEWS",
"creatives": {
"primaryText": "Shop now!",
"headline": "Amazing Products",
"callToAction": "SHOP_NOW",
"imageUrl": "https://images.pexels.com/photos/998641/pexels-photo-998641.jpeg",
"url": "https://example.com"
}
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| x-api-key | header | string | no | none |
| body | body | object | yes | none |
| » campaignName | body | string | yes | none |
| » status | body | string | no | Optional (default PAUSED) |
| » budget | body | integer | yes | Campaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta). |
| » startDate | body | string | no | must be in YYYY-MM-DD format |
| » endDate | body | string | no | must be in YYYY-MM-DD format |
| » specialAdCategories | body | [string] | no | Required when running employment/housing/credit/etc (default [NONE]) |
| » specialAdCountry | body | [string] | no | Required if specialAdCategory is not NONE, Countries where the special category applies. |
| » adSetName | body | string | yes | none |
| » audienceId | body | [string] | no | IDs of saved or custom audiences |
| » targeting | body | object | yes | none |
| »» genders | body | [integer] | no | Default ALL |
| »» ageMin | body | integer | no | none |
| »» ageMax | body | integer | no | none |
| »» geoLocations | body | [object] | yes | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» excludedGeoLocations | body | [object] | no | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» interests | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» behaviors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» relationshipStatuses | body | [integer] | no | none |
| »» lifeEvents | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» industries | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» income | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» familyStatuses | body | object | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationSchools | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationStatuses | body | [string] | no | none |
| »» educationMajors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workEmployers | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workPositions | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» locales | body | [number] | no | none |
| » creatives | body | object | yes | none |
| »» primaryText | body | string | yes | Main body copy displayed above the creative. |
| »» headline | body | string | yes | Bold headline shown under the image/video. |
| »» url | body | string | yes | Landing page or Messenger deep link. |
| »» callToAction | body | string | yes | CTA button label |
| »» imageUrl | body | string | yes | HTTPS URL to a 1.91:1 image. |
| »» videoId | body | string | no | Existing Meta video ID |
| »» thumbnailUrl | body | string | no | Required when supplying `videoId |
| »» description | body | string | no | Supporting text below the headline. |
| » pageid | body | string | yes | Page representing the brand running the ads. |
| » instagramActorId | body | string | no | Instagram Business Account ID for IG messaging/placements. |
| » pixelId | body | string | yes | Meta Pixel ID firing purchase events. |
| » conversionEvent | body | string | yes | Standard event Meta optimizes for |
| » catalogId | body | string | no | Commerce catalog ID |
| » productSetId | body | string | no | Subset of a catalog |
| » customConversionId | body | string | no | none |
Enum#
| Name | Value |
|---|
| » status | ACTIVE |
| » status | PAUSED |
| » specialAdCategories | NONE |
| » specialAdCategories | EMPLOYMENT |
| » specialAdCategories | HOUSING |
| » specialAdCategories | CREDIT |
| » specialAdCategories | ISSUES_ELECTIONS_POLITICS |
| » specialAdCategories | ONLINE_GAMBLING_AND_GAMING |
| » specialAdCategories | FINANCIAL_PRODUCTS_SERVICES |
| »» genders | 0 |
| »» genders | 1 |
| »» genders | 2 |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »» educationStatuses | 1 |
| »» educationStatuses | 2 |
| »» educationStatuses | 3 |
| »» educationStatuses | 4 |
| »» educationStatuses | 5 |
| »» educationStatuses | 6 |
| »» educationStatuses | 7 |
| »» educationStatuses | 8 |
| »» educationStatuses | 9 |
| »» educationStatuses | 10 |
| »» educationStatuses | 11 |
| »» educationStatuses | 12 |
| »» educationStatuses | 13 |
| »» callToAction | SIGN_UP |
| »» callToAction | GET_QUOTE |
| »» callToAction | APPLY_NOW |
| »» callToAction | LEARN_MORE |
| »» callToAction | DOWNLOAD |
| »» callToAction | SUBSCRIBE |
| »» callToAction | BOOK_TRAVEL |
| » conversionEvent | PURCHASE |
| » conversionEvent | ADD_TO_CART |
| » conversionEvent | INITIATE_CHECKOUT |
| » conversionEvent | SUBSCRIBE |
| » conversionEvent | COMPLETE_REGISTRATION |
{
"success": true,
"data": {
"campaignId": "string",
"adSetId": "string",
"adId": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Created campaign data |
| »» campaignId | string | true | none | | Created campaign ID |
| »» adSetId | string | true | none | | Created ad set ID |
| »» adId | string | true | none | | Created ad ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 201 | Created | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Created campaign data |
| »» campaignId | string | true | none | | Created campaign ID |
| »» adSetId | string | true | none | | Created ad set ID |
| »» adId | string | true | none | | Created ad ID |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
POST Create Awareness Campaign#
POST /{teamId}/meta/campaign/awarenessThis endpoint is used to create a campaign for leads ads. Lead generation ads are ad campaigns designed to collect contact information (like name, email, phone number) directly from users on Meta platforms without needing them to leave the app.{
"campaignName": "Awareness - Basic Reach",
"status": "PAUSED",
"budget": 10,
"startDate": "2025-12-01",
"endDate": "2025-12-10",
"specialAdCategories": ["NONE"],
"adSetName": "Awareness Adset - Basic",
"pageId": "784350118091291",
"creatives": {
"primaryText": "This is a basic awareness ad",
"headline": "Brand Awareness",
"callToAction": "LEARN_MORE",
"imageUrl": "https://images.pexels.com/photos/9160637/pexels-photo-9160637.jpeg",
"description": "Short description for awareness ad",
"url": "https://example.com"
},
"targeting": {
"ageMin": 18,
"ageMax": 35,
"genders": [0],
"geoLocations": [
{
"type": "country",
"id": "US"
}
]
},
"optimizationGoal": "REACH"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| x-api-key | header | string | no | none |
| body | body | object | yes | none |
| » campaignName | body | string | yes | none |
| » status | body | string | no | Optional (default PAUSED) |
| » budget | body | integer | yes | Campaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta). |
| » startDate | body | string | no | must be in YYYY-MM-DD format |
| » endDate | body | string | no | must be in YYYY-MM-DD format |
| » specialAdCategories | body | [string] | no | Required when running employment/housing/credit/etc (default [NONE]) |
| » specialAdCountry | body | [string] | no | Required if specialAdCategory is not NONE, Countries where the special category applies. |
| » adSetName | body | string | yes | none |
| » audienceId | body | [string] | no | IDs of saved or custom audiences |
| » targeting | body | object | yes | none |
| »» genders | body | [integer] | no | Default ALL |
| »» ageMin | body | integer | no | none |
| »» ageMax | body | integer | no | none |
| »» geoLocations | body | [object] | yes | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» excludedGeoLocations | body | [object] | no | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» interests | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» behaviors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» relationshipStatuses | body | [integer] | no | none |
| »» lifeEvents | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» industries | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» income | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» familyStatuses | body | object | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationSchools | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationStatuses | body | [string] | no | none |
| »» educationMajors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workEmployers | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workPositions | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» locales | body | [number] | no | none |
| » creatives | body | object | yes | none |
| »» primaryText | body | string | yes | Main body copy displayed above the creative. |
| »» headline | body | string | yes | Bold headline shown under the image/video. |
| »» url | body | string | yes | Landing page or Messenger deep link. |
| »» callToAction | body | string | yes | CTA button label |
| »» imageUrl | body | string | yes | HTTPS URL to a 1.91:1 image. |
| »» videoId | body | string | no | Existing Meta video ID |
| »» thumbnailUrl | body | string | no | Required when supplying `videoId |
| »» description | body | string | no | Supporting text below the headline. |
| » pageid | body | string | yes | Page representing the brand running the ads. |
| » instagramActorId | body | string | no | Instagram Business Account ID for IG messaging/placements. |
| » pixelId | body | string | yes | Meta Pixel ID firing purchase events. |
| » conversionEvent | body | string | yes | Standard event Meta optimizes for |
| » catalogId | body | string | no | Commerce catalog ID |
| » productSetId | body | string | no | Subset of a catalog |
| » customConversionId | body | string | no | none |
Enum#
| Name | Value |
|---|
| » status | ACTIVE |
| » status | PAUSED |
| » specialAdCategories | NONE |
| » specialAdCategories | EMPLOYMENT |
| » specialAdCategories | HOUSING |
| » specialAdCategories | CREDIT |
| » specialAdCategories | ISSUES_ELECTIONS_POLITICS |
| » specialAdCategories | ONLINE_GAMBLING_AND_GAMING |
| » specialAdCategories | FINANCIAL_PRODUCTS_SERVICES |
| »» genders | 0 |
| »» genders | 1 |
| »» genders | 2 |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »» educationStatuses | 1 |
| »» educationStatuses | 2 |
| »» educationStatuses | 3 |
| »» educationStatuses | 4 |
| »» educationStatuses | 5 |
| »» educationStatuses | 6 |
| »» educationStatuses | 7 |
| »» educationStatuses | 8 |
| »» educationStatuses | 9 |
| »» educationStatuses | 10 |
| »» educationStatuses | 11 |
| »» educationStatuses | 12 |
| »» educationStatuses | 13 |
| »» callToAction | SIGN_UP |
| »» callToAction | GET_QUOTE |
| »» callToAction | APPLY_NOW |
| »» callToAction | LEARN_MORE |
| »» callToAction | DOWNLOAD |
| »» callToAction | SUBSCRIBE |
| »» callToAction | BOOK_TRAVEL |
| » conversionEvent | PURCHASE |
| » conversionEvent | ADD_TO_CART |
| » conversionEvent | INITIATE_CHECKOUT |
| » conversionEvent | SUBSCRIBE |
| » conversionEvent | COMPLETE_REGISTRATION |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
POST Create Engagement Campaign#
POST /{teamId}/meta/campaign/engagementThis endpoint is used to create a campaign for leads ads. Lead generation ads are ad campaigns designed to collect contact information (like name, email, phone number) directly from users on Meta platforms without needing them to leave the app.{
"campaignName": "Engagement - On Ad - Post Engagement",
"status": "PAUSED",
"budget": 100,
"adSetName": "Engagement Ad Set",
"pageId": "173764419345388",
"conversionLocation": "ON_AD",
"engagementType": "POST_ENGAGEMENT",
"optimizationGoal": "POST_ENGAGEMENT",
"creatives": {
"primaryText": "Engage with this post!",
"headline": "Amazing Content",
"callToAction": "LEARN_MORE",
"imageUrl": "https://images.pexels.com/photos/998641/pexels-photo-998641.jpeg?cs=srgb&dl=pexels-francesco-ungaro-998641.jpg&fm=jpg"
}
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| x-api-key | header | string | no | none |
| body | body | object | yes | none |
| » campaignName | body | string | yes | none |
| » status | body | string | no | Optional (default PAUSED) |
| » budget | body | integer | yes | Campaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta). |
| » startDate | body | string | no | must be in YYYY-MM-DD format |
| » endDate | body | string | no | must be in YYYY-MM-DD format |
| » specialAdCategories | body | [string] | no | Required when running employment/housing/credit/etc (default [NONE]) |
| » specialAdCountry | body | [string] | no | Required if specialAdCategory is not NONE, Countries where the special category applies. |
| » adSetName | body | string | yes | none |
| » audienceId | body | [string] | no | IDs of saved or custom audiences |
| » targeting | body | object | yes | none |
| »» genders | body | [integer] | no | Default ALL |
| »» ageMin | body | integer | no | none |
| »» ageMax | body | integer | no | none |
| »» geoLocations | body | [object] | yes | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» excludedGeoLocations | body | [object] | no | none |
| »»» type | body | string | yes | none |
| »»» id | body | string | yes | none |
| »» interests | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» behaviors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» relationshipStatuses | body | [integer] | no | none |
| »» lifeEvents | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» industries | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» income | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» familyStatuses | body | object | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationSchools | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» educationStatuses | body | [string] | no | none |
| »» educationMajors | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workEmployers | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» workPositions | body | [object] | no | none |
| »»» id | body | string | yes | none |
| »»» name | body | string | no | none |
| »» locales | body | [number] | no | none |
| » creatives | body | object | yes | none |
| »» primaryText | body | string | yes | Main body copy displayed above the creative. |
| »» headline | body | string | yes | Bold headline shown under the image/video. |
| »» url | body | string | yes | Landing page or Messenger deep link. |
| »» callToAction | body | string | yes | CTA button label |
| »» imageUrl | body | string | yes | HTTPS URL to a 1.91:1 image. |
| »» videoId | body | string | no | Existing Meta video ID |
| »» thumbnailUrl | body | string | no | Required when supplying `videoId |
| »» description | body | string | no | Supporting text below the headline. |
| » pageid | body | string | yes | Page representing the brand running the ads. |
| » instagramActorId | body | string | no | Instagram Business Account ID for IG messaging/placements. |
| » pixelId | body | string | yes | Meta Pixel ID firing purchase events. |
| » conversionEvent | body | string | yes | Standard event Meta optimizes for |
| » catalogId | body | string | no | Commerce catalog ID |
| » productSetId | body | string | no | Subset of a catalog |
| » customConversionId | body | string | no | none |
Enum#
| Name | Value |
|---|
| » status | ACTIVE |
| » status | PAUSED |
| » specialAdCategories | NONE |
| » specialAdCategories | EMPLOYMENT |
| » specialAdCategories | HOUSING |
| » specialAdCategories | CREDIT |
| » specialAdCategories | ISSUES_ELECTIONS_POLITICS |
| » specialAdCategories | ONLINE_GAMBLING_AND_GAMING |
| » specialAdCategories | FINANCIAL_PRODUCTS_SERVICES |
| »» genders | 0 |
| »» genders | 1 |
| »» genders | 2 |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »»» type | country |
| »»» type | region |
| »»» type | city |
| »» educationStatuses | 1 |
| »» educationStatuses | 2 |
| »» educationStatuses | 3 |
| »» educationStatuses | 4 |
| »» educationStatuses | 5 |
| »» educationStatuses | 6 |
| »» educationStatuses | 7 |
| »» educationStatuses | 8 |
| »» educationStatuses | 9 |
| »» educationStatuses | 10 |
| »» educationStatuses | 11 |
| »» educationStatuses | 12 |
| »» educationStatuses | 13 |
| »» callToAction | SIGN_UP |
| »» callToAction | GET_QUOTE |
| »» callToAction | APPLY_NOW |
| »» callToAction | LEARN_MORE |
| »» callToAction | DOWNLOAD |
| »» callToAction | SUBSCRIBE |
| »» callToAction | BOOK_TRAVEL |
| » conversionEvent | PURCHASE |
| » conversionEvent | ADD_TO_CART |
| » conversionEvent | INITIATE_CHECKOUT |
| » conversionEvent | SUBSCRIBE |
| » conversionEvent | COMPLETE_REGISTRATION |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Get Page Lead forms#
GET /{teamId}/meta/lead-formParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team id |
| adAccountId | query | string | no | Your facebook ad account id |
| pageId | query | string | no | Your Facebook page id |
| x-api-key | header | string | no | none |
{
"data": [
{
"id": "string",
"name": "string"
}
]
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » data | [object] | true | none | | none |
| »» id | string | false | none | | none |
| »» name | string | false | none | | none |
POST Create Page Lead form#
POST /{teamId}/meta/lead-form{
"pageId": "string",
"questions": [
{
"type": "CUSTOM",
"label": "string",
"options": [
{
"value": "string",
"key": "string"
}
]
}
],
"privacyPolicyUrl": "string",
"privacyPolicyName": "string",
"name": "string",
"thankYouPage": {
"title": "string",
"body": "string",
"buttonText": "string",
"buttonType": "VIEW_WEBSITE",
"websiteUrl": "string",
"countryCode": "string",
"businessPhoneNumber": "string"
},
"language": "AR_AR",
"introPage": {
"title": "string",
"style": "LIST_STYLE",
"content": ["string"]
}
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team id |
| adAccountId | query | string | no | Your facebook ad account id |
| x-api-key | header | string | no | none |
| body | body | object | yes | none |
| » pageId | body | string | yes | Page id |
| » questions | body | [object] | yes | none |
| »» type | body | string | yes | none |
| »» label | body | string | yes | none |
| »» options | body | [object] | yes | none |
| »»» value | body | string | yes | none |
| »»» key | body | string | yes | none |
| » privacyPolicyUrl | body | string | yes | none |
| » privacyPolicyName | body | string | yes | none |
| » name | body | string | yes | none |
| » thankYouPage | body | object | yes | none |
| »» title | body | string | yes | none |
| »» body | body | string | yes | none |
| »» buttonText | body | string | yes | none |
| »» buttonType | body | string | yes | none |
| »» websiteUrl | body | string | no | required only if button type is VIEW_WEBSITE |
| »» countryCode | body | string | yes | required only if button type is CALL_BUSINESS or WHATSAPP and should be ISO31661Alpha2 |
| »» businessPhoneNumber | body | string | yes | required only if button type is CALL_BUSINESS or WHATSAPP |
| » language | body | string | yes | none |
| » introPage | body | object | no | none |
| »» title | body | string | yes | none |
| »» style | body | string | yes | none |
| »» content | body | [string] | yes | none |
Enum#
| Name | Value |
|---|
| »» type | CUSTOM |
| »» type | CITY |
| »» type | COMPANY_NAME |
| »» type | COUNTRY |
| »» type | DOB |
| »» type | EMAIL |
| »» type | GENDER |
| »» type | FIRST_NAME |
| »» type | FULL_NAME |
| »» type | JOB_TITLE |
| »» type | LAST_NAME |
| »» type | MARITIAL_STATUS |
| »» type | WHATSAPP_NUMBER |
| »» type | EDUCATION_LEVEL |
| »» type | WEBSITE |
| »» type | PHONE |
| »» type | PHONE_OTP |
| »» type | POST_CODE |
| »» type | PROVINCE |
| »» type | RELATIONSHIP_STATUS |
| »» type | STATE |
| »» type | STREET_ADDRESS |
| »» type | ZIP |
| »» type | WORK_EMAIL |
| »» type | MILITARY_STATUS |
| »» buttonType | VIEW_WEBSITE |
| »» buttonType | CALL_BUSINESS |
| »» buttonType | MESSAGE_BUSINESS |
| »» buttonType | DOWNLOAD |
| »» buttonType | SCHEDULE_APPOINTMENT |
| »» buttonType | VIEW_ON_FACEBOOK |
| »» buttonType | PROMO_CODE |
| »» buttonType | NONE |
| »» buttonType | WHATSAPP |
| » language | AR_AR |
| » language | CS_CZ |
| » language | DA_DK |
| » language | DE_DE |
| » language | EL_GR |
| » language | EN_GB |
| » language | EN_US |
| » language | ES_ES |
| » language | ES_LA |
| » language | FI_FI |
| » language | FR_FR |
| » language | HE_IL |
| » language | HI_IN |
| » language | HU_HU |
| » language | ID_ID |
| » language | IT_IT |
| » language | JA_JP |
| » language | KO_KR |
| » language | NB_NO |
| » language | NL_NL |
| » language | PL_PL |
| » language | PT_BR |
| » language | PT_PT |
| » language | RO_RO |
| » language | RU_RU |
| » language | SV_SE |
| » language | TH_TH |
| » language | TR_TR |
| » language | VI_VN |
| » language | ZH_CN |
| » language | ZH_HK |
| » language | ZH_TW |
| »» style | LIST_STYLE |
| »» style | PARAGRAPH_STYLE |
{
"success": true,
"data": {
"id": "string"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » success | boolean | true | none | | Always true for successful responses |
| » data | object | true | none | | Response data |
| »» id | string | true | none | | the id of the lead forms |
| » message | string | false | none | | Success message |
| » timestamp | string | true | none | | ISO 8601 timestamp |
| » statusCode | integer | true | none | | HTTP status code |
GET Get Pixels#
GET /{teamId}/meta/pixelsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team id |
| adAccountId | query | string | yes | Your facebook ad account id |
| x-api-key | header | string | yes | none |
{
"data": [
{
"id": "string",
"name": "string"
}
]
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
| Name | Type | Required | Restrictions | Title | description |
|---|
| » data | [object] | true | none | | none |
| »» id | string | false | none | | none |
| »» name | string | false | none | | none |
POST Create Pixel#
POST /{teamId}/meta/pixels{
"name": "Test Pixel",
"description": "Created via API"
}
Params#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | Team id |
| adAccountId | query | string | no | Your facebook ad account id |
| x-api-key | header | string | yes | none |
| body | body | object | yes | none |
| » name | body | string | yes | none |
| » description | body | string | yes | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Get Saved Audience#
GET /{teamId}/meta/savedAudienceParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| x-api-key | header | string | yes | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Get Custom Audience#
GET /{teamId}/meta/customAudienceParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | yes | none |
| x-api-key | header | string | yes | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
Test#
POST Untitled Endpoint#
POST /act_483489024830589/campaignsParams#
| Name | Location | Type | Required | Description |
|---|
| access_token | query | string | no | none |
| name | query | string | no | none |
| objective | query | string | no | none |
| status | query | string | no | none |
| special_ad_categories | query | array[string] | no | none |
| is_adset_budget_sharing_enabled | query | string | no | none |
| bid_strategy | query | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Untitled Endpoint Copy#
GET /act_483489024830589/campaignsParams#
| Name | Location | Type | Required | Description |
|---|
| access_token | query | string | no | none |
| fields | query | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Untitled Endpoint#
GET /v24.0/act_483489024830589/campaignsParams#
| Name | Location | Type | Required | Description |
|---|
| access_token | query | string | no | none |
| limit | query | string | no | none |
| after | query | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
Google#
GET list accessible customers#
GET /{teamId}/google/list-accessible-accountsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| x-api-key | header | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET import#
GET /{teamId}/google/importParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| x-api-key | header | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET insights#
GET /{teamId}/google/insightsParams#
| Name | Location | Type | Required | Description |
|---|
| teamId | path | string | yes | none |
| adAccountId | query | string | no | none |
| fields | query | array[string] | no | none |
| startDate | query | string | no | none |
| endDate | query | string | no | none |
| level | query | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
GET Assets#
GET /teamId}/google/assetsParams#
| Name | Location | Type | Required | Description |
|---|
| adAccountId | query | string | no | none |
| fields | query | array[string] | no | none |
| level | query | string | no | none |
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}
Responses#
| HTTP Status Code | Meaning | Description | Data schema |
|---|
| 200 | OK | none | Inline |
Responses Data Schema#
Data Schema#
Attribute#
| Name | Type | Required | Restrictions | Title | Description |
|---|
| name | string | true | none | | The full name of the user registering for the workspace. |
{
"platform": "string",
"teamId": "string"
}
Attribute#
| Name | Type | Required | Restrictions | Title | Description |
|---|
| platform | string | true | none | | The advertising platform to connect with. |
| teamId | string | true | none | | The unique UUID of the team initiating the platform connection. |
{
"name": "string",
"email": "string",
"password": "string",
"workspaceName": "string",
"externalUserId": "string"
}
Attribute#
| Name | Type | Required | Restrictions | Title | Description |
|---|
| name | string | true | none | | The full name of the user registering for the application. |
| email | string | true | none | | The user’s valid email address, used as a unique identifier for login and communication. |
| password | string | true | none | | The user’s chosen password. It must meet security standards such as including uppercase and lowercase letters, numbers, and special characters. |
| workspaceName | string | true | none | | The name of the workspace to be created for the new user. |
| externalUserId | string | true | none | | A unique identifier that can be used to link this user to an external system or third-party integration. |
Modified at 2025-12-15 14:43:20