Body Parameters
{
"externalUserId": "1"
}| 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. |
Response Examples
201 Response
{
"success": true,
"data": {
"accessToken": "string",
"refreshToken": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}400 Response
{
"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"
}401 Response
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 401,
"path": "/api/v1/auth/token"
}404 Response
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Tenant not found"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 404,
"path": "/api/v1/auth/token"
}500 Response
{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 500,
"path": "/api/v1/auth/token"
}| 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 |
| 404 | Not Found | none | Inline |
| 500 | Internal Server Error | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": {
"accessToken": "string"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"enterpriseId": "1",
"workspaceName": "New Workspace"
}| 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 |
Response Examples
201 Response
{
"success": true,
"data": {
"id": "string",
"name": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}400 Response
{
"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"
}401 Response
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 401,
"path": "/api/v1/workspace"
}403 Response
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 403,
"path": "/api/v1/workspace"
}404 Response
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Tenant not found"
},
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 404,
"path": "/api/v1/workspace"
}| 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 |
| 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 |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"name": "New Name"
}| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Workspace deleted successfully with its teams",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"adminId": "4"
}| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
Body Parameters
{
"enterpriseId": "2",
"name": "New Team"
}| 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 |
Response Examples
201 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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 |
Body Parameters
{
"enterpriseId": "1"
}| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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 |
Body Parameters
{
"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"
}
]
}| 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) |
Response Examples
201 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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 |
| 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 |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"members": ["external-user-id-1", "external-user-id-2"]
}| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Member(s) removed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"name": "Updated Name"
}| 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 |
Response Examples
200 Response
{
"success": true,
"data": {
"id": "string",
"name": "Updated Name"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "'Team Team Name' deleted successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"platform": "meta",
"workspaceId": "{{workspace-id}}",
"teamId": "{{team-id}}",
"redirect": "https://example.xxx"
}| 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 |
Response Examples
201 Response
{
"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"
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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.). |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": {
"deleted": { ... }
},
"message": "Connection uuid and all related data deleted successfully.",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": {
"impressions": 10000,
"clicks": 500,
"spend": 250.0
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"adAccountId": "string",
"externalUserId": "string",
"permission": "MANAGER"
}| 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) |
| Name | Value |
|---|---|
| » permission | MANAGER |
| » permission | VIEWER |
Response Examples
201 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 500 | Internal Server Error | none | Inline |
| 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 |
Body Parameters
{
"adAccountId": "string",
"externalUserId": "string"
}| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Ad account revoked from member successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"adAccountId": "act_483489024830589",
"externalUserId": "1",
"permission": "VIEWER"
}| 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) |
| Name | Value |
|---|---|
| » permission | MANAGER |
| » permission | VIEWER |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": { ... },
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
Response Examples
200 Response
{
"success": true,
"data": { ... },
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"type": "location",
"query": "New York"
}| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string"
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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) |
| 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 |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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 |
| 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 |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"object_story_spec": { ... }
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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 |
| 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 |
Response Examples
200 Response
{
"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
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": [
{
"id": "string",
"name": "string",
"status": "string",
"objective": "string"
}
],
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": {
"id": "string",
"status": "PAUSED"
},
"message": "Request successful",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Body Parameters
{
"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"
}
}| 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' |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
Body Parameters
{
"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"
}
}| 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 |
| 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 |
Response Examples
201 Response
{
"success": true,
"data": {
"campaignId": "string",
"adSetId": "string",
"adId": "string"
},
"message": "Resource created successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 201
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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 |
| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 201 | Created | none | Inline |
| 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 |
Body Parameters
{
"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"
}| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
Body Parameters
{
"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"
}
}| 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 |
| 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 |
Response Examples
200 Response
{
"success": true,
"data": null,
"message": "Admin changed successfully",
"timestamp": "2025-12-15T10:30:00.000Z",
"statusCode": 200
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 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 |
Response Examples
200 Response
{
"data": [
{
"id": "string",
"name": "string"
}
]
}| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| Name | Type | Required | Restrictions | Title | description |
|---|---|---|---|---|---|
| » data | [object] | true | none | none | |
| »» id | string | false | none | none | |
| »» name | string | false | none | none |
Body Parameters
{
"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"]
}
}| 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 |
| Name | Value |
|---|---|
| »» type | CUSTOM |
| »» type | CITY |
| »» type | COMPANY_NAME |
| »» type | COUNTRY |
| »» type | DOB |
| »» type | |
| »» 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 |