Adlyft
  1. new module
Adlyft
  • Default module
    • Introduction
    • Getting Started
    • Auth Mangment
      • Get User Token
      • Refresh User Token
    • Workspace Mangment
      • Create Workspace
      • Get single workspace
      • Update Workspace
      • Delete Worksapace
      • Change Workspace Admin
    • Team Mangment
      • Create Team
      • Get Workspace Teams
      • Assign member
      • Get team members
      • Get Team By ID
      • Update Team Name
      • Delete Team
      • Delete Team Member
    • Connection
      • Create Connection
      • Get connections by teamId
      • List of ad accounts and their connection statuses.
      • Delete connection
      • Disconnect
      • Get insights
    • Ads Account Mangment
      • Assign ad account
      • Revoke ad account
      • Change ad account
    • Meta
      • Campaigns
        • Get Campaigns
        • Update Campaign Status
        • Create Lead Campaign
        • Create Traffic Campaign
        • Create Sales Campaign
        • Create Awareness Campaign
        • Create Engagement Campaign
      • Lead Form
        • Get Page Lead forms
        • Create Page Lead form
      • Pixels
        • Create Pixel
        • Get Pixels
      • Audience
        • Get Saved Audience
        • Get Custom Audience
      • Import
      • Facebook pages
      • Targeting Search
      • Get Ads
      • Get AdSet
      • Get AdCreative
      • Get Insights
    • Google
      • list accessible customers
      • import
      • insights
      • Assets
  • new module
    • Default module
  1. new module

Default module

Base URLs:

Authentication#

HTTP Authentication, scheme: bearer

Auth Mangment#

POST Get User Token#

POST /auth/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.
Body Parameters
{
  "externalUserId": "1"
}

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
bodybodyobjectnonone
» externalUserIdbodystringyesThe 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"
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline
400Bad RequestInvalid request data. Please check your input and try again.Inline
401UnauthorizedMissing or invalid API key. Please include a valid x-api-key header.Inline
404Not FoundnoneInline
500Internal Server ErrornoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» accessTokenstringtruenoneAccess token avaliable for 1 hour
»» refreshTokenstringtruenoneRefresh token avaliable for 1 day
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
HTTP Status Code 400
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (e.g., BAD_REQUEST)
»» messagestringtruenoneError message
»» detailsarrayfalsenoneValidation error details
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 401
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (e.g., UNAUTHORIZED)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 404
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (e.g., NOT_FOUND)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 500
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (e.g., INTERNAL_ERROR)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path

GET Refresh User Token#

GET /auth/refresh-token
This api used to refresh user access token , attach Refresh token as authorization header to get new access token

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (Refresh token)
Response Examples
200 Response
{
  "success": true,
  "data": {
    "accessToken": "string"
  },
  "message": "Request successful",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» accessTokenstringtruenoneNew access token
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Workspace Mangment#

POST Create Workspace#

POST /workspace/
Here you can create workspace for a user by user email
Body Parameters
{
  "enterpriseId": "1",
  "workspaceName": "New Workspace"
}

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» workspaceNamebodystringyesThe Workspace Name
» enterpriseIdbodystringyesYour 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"
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline
400Bad RequestInvalid request data. Please check your input and try again.Inline
401UnauthorizedMissing or invalid API key. Please include a valid x-api-key header.Inline
403ForbiddenMissing or invalid authorization token. Please include a valid Bearer token in the Authorization header.Inline
404Not FoundnoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneWorkspace ID
»» namestringtruenoneWorkspace name
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
HTTP Status Code 400
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (BAD_REQUEST)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 401
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (UNAUTHORIZED)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 403
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (FORBIDDEN)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path
HTTP Status Code 404
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (NOT_FOUND)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path

GET Get single workspace#

GET /workspace/{id}

Params#

NameLocationTypeRequiredDescription
idpathstringyesenterpriseId
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneWorkspace ID
»» namestringtruenoneWorkspace name
»» adminobjecttruenoneAdmin user info
»»» externalUserIdstringtruenoneAdmin external user ID
»» enterpriseIdstringtruenoneEnterprise identifier
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

PATCH Update Workspace#

PATCH /workspace/{id}
Body Parameters
{
  "name": "New Name"
}

Params#

NameLocationTypeRequiredDescription
idpathstringyesenterpriseId
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» namebodystringnoThe 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneWorkspace ID
»» namestringtruenoneWorkspace name
»» adminIdstringtruenoneAdmin user ID
»» enterpriseIdstringtruenoneEnterprise identifier
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

DELETE Delete Workspace#

DELETE /workspace/{id}

Params#

NameLocationTypeRequiredDescription
idpathstringyesenterpriseId
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» datanulltruenoneResponse data (null for delete operations)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

PATCH Change Workspace Admin#

PATCH /workspace/{enterpriseId}/change-admin
Body Parameters
{
  "adminId": "4"
}

Params#

NameLocationTypeRequiredDescription
enterpriseIdpathstringyesEnterprise ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» adminIdbodystringyesThe 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Team Mangment#

POST Create Team#

POST /teams
This endpoint is used to create new team under specific workspace (Enterprise). Only workspace admin can create teams.
Body Parameters
{
  "enterpriseId": "2",
  "name": "New Team"
}

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» enterpriseIdbodystringyesEnterprise ID (workspace identifier)
» namebodystringyesTeam 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneTeam ID
»» namestringtruenoneTeam name
»» isDefaultbooleantruenoneWhether this is the default team
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Get Workspace Teams#

POST /teams/get-all
This endpoint is used to get specific workspace(Enterprise) teams. Only workspace admin can access this endpoint.
Body Parameters
{
  "enterpriseId": "1"
}

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» enterpriseIdbodystringyesEnterprise 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of teams
»» idstringtruenoneTeam ID
»» namestringtruenoneTeam name
»» isDefaultbooleantruenoneWhether this is the default team
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
»» TeamMembersarraytruenoneTeam members array
»»» idstringtruenoneTeam member ID
»»» rolestringtruenoneMember role (ADMIN or MEMBER)
»»» createdAtstringtruenoneCreation timestamp
»»» updatedAtstringtruenoneLast update timestamp
»»» userobjecttruenoneUser information
»»»» externalUserIdstringtruenoneExternal user ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Assign member#

POST /teams/{teamId}/members
This 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.
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"
    }
  ]
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» membersbody[object]yesArray of members to assign
»» externalUserIdbodystringyesExternal user ID
»» rolebodystringyesMember 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 201 (Single member)
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneTeam member data
»» idstringtruenoneTeam member ID
»» rolestringtruenoneMember role
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
HTTP Status Code 200 (Multiple members)
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneBatch operation result
»» successfularraytruenoneSuccessfully assigned members
»»» externalUserIdstringtruenoneExternal user ID
»»» teamMemberobjecttruenoneTeam member data
»» failedarraytruenoneFailed assignments
»»» externalUserIdstringtruenoneExternal user ID
»»» errorstringtruenoneError message
»» summaryobjecttruenoneOperation summary
»»» totalintegertruenoneTotal members processed
»»» successCountintegertruenoneNumber of successful assignments
»»» failureCountintegertruenoneNumber of failed assignments
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get team members#

GET /teams/{teamId}/members
This endpoint is used to get team members. Any team member (ADMIN or MEMBER) can view team members.

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of team members
»» idstringtruenoneTeam member ID
»» rolestringtruenoneMember role
»» userIdstringtruenoneUser ID
»» createdAtstringtruenoneCreation timestamp
»» updatedAtstringtruenoneLast update timestamp
»» userobjecttruenoneUser information
»»» externalUserIdstringtruenoneExternal user ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

DELETE Remove Team Members#

DELETE /teams/{teamId}/members
This endpoint is used to remove member(s) from the team. Only team admin can remove members. Supports both single and multiple member removal.
Body Parameters
{
  "members": ["external-user-id-1", "external-user-id-2"]
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» membersbody[string]yesArray 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» datanulltruenoneResponse data (null for delete operations)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get Team By ID#

GET /teams/{id}
This endpoint is used to get team informations by id. Any team member (ADMIN or MEMBER) can view team details.

Params#

NameLocationTypeRequiredDescription
idpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneTeam ID
»» namestringtruenoneTeam name
»» isDefaultbooleantruenoneWhether this is the default team
»» workspaceobjecttruenoneWorkspace information
»»» namestringtruenoneWorkspace name
»»» enterpriseIdstringtruenoneEnterprise identifier
»» TeamMembersarraytruenoneTeam members array
»»» idstringtruenoneTeam member ID
»»» rolestringtruenoneMember role
»»» userobjecttruenoneUser information
»»»» externalUserIdstringtruenoneExternal user ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

PATCH Update Team Name#

PATCH /teams/{id}
This endpoint is used to update team name. Only team admin can update team name.
Body Parameters
{
  "name": "Updated Name"
}

Params#

NameLocationTypeRequiredDescription
idpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» namebodystringyesNew 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenoneTeam ID
»» namestringtruenoneUpdated team name
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

DELETE Delete Team#

DELETE /teams/{id}
This endpoint is used to delete team. Only workspace admin can delete teams.

Params#

NameLocationTypeRequiredDescription
idpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» datanulltruenoneResponse data (null for delete operations)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Connection#

GET Get All Connections#

GET /connections
Fetches all connections for the tenant. Only team admin can access this endpoint.

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» successbooleantruenoneOperation success
»» countintegertruenoneNumber of connections
»» dataarraytruenoneArray of connections
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Create Connection#

POST /connections
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.
Body Parameters
{
  "platform": "meta",
  "workspaceId": "{{workspace-id}}",
  "teamId": "{{team-id}}",
  "redirect": "https://example.xxx"
}

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» platformbodystringyesPlatform name (meta, google, etc.)
» workspaceIdbodystringnoWorkspace ID (optional, used to auto-select default team)
» teamIdbodystringnoTeam ID (optional, auto-selected if workspaceId provided)
» redirectbodystringnoYour 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"
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» authUrlstringtruenoneThis 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#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET List of ad accounts and their connection statuses.#

GET /connections/status
Returns a list of all ad accounts and their current connection status with external platforms. Only team admin can access this endpoint.

Params#

NameLocationTypeRequiredDescription
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» connectedarraytruenoneArray of connection statuses
»»» platformstringtruenonePlatform name
»»» connectedbooleantruenoneConnection status
»»» ads_accooun_idstringtruenoneAd account ID
»»» account_namestringtruenoneAccount name
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

DELETE Delete connection#

DELETE /connections/{adsaccountid}/remove-connection
Removes the connection associated with the specified ad account. Only team admin can remove connections.

Params#

NameLocationTypeRequiredDescription
adsaccountidpathstringyesAd account ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» tenantIdstringtruenoneTenant ID
»» adsAccountIdstringtruenoneAd account ID
»» deletedConnectionsintegertruenoneNumber of deleted connections
»» deletedAdsAccountbooleantruenoneWhether ad account was deleted
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

DELETE Disconnect#

DELETE /connections/{connectionId}/disconnect
Deletes the connection and all related data (ads accounts, tokens, etc.) for the specified connection ID. Only team admin can disconnect connections.

Params#

NameLocationTypeRequiredDescription
connectionIdpathstringyesConnection ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» deletedobjecttruenoneDeleted connection details
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get insights#

GET /connections/{id}/insights
Gets insights for a specific ad account connection. Team members (ADMIN or MEMBER) can access this endpoint.

Params#

NameLocationTypeRequiredDescription
idpathstringyesAd account ID
start_datequerystringyesStart date (YYYY-MM-DD format)
end_datequerystringyesEnd date (YYYY-MM-DD format)
metricsquerystringyesComma-separated list of metrics (e.g., "impressions,clicks,spend")
breakdownquerystringnoBreakdown dimension (optional)
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneInsights data (varies by metrics requested)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Ads Account Mangment#

POST Assign ad account#

POST /{teamId}/ads-accounts/assign
This endpoint is used to give permission to one of your team members to specific ad account. Only team admin can assign ad accounts.
Body Parameters
{
  "adAccountId": "string",
  "externalUserId": "string",
  "permission": "MANAGER"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» adAccountIdbodystringyesAd account ID (from Meta/Google)
» externalUserIdbodystringyesExternal user ID
» permissionbodystringyesPermission level (MANAGER or VIEWER)

Enum#

NameValue
» permissionMANAGER
» permissionVIEWER
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline
500Internal Server ErrornoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenonePermission ID
»» permissionstringtruenonePermission level (MANAGER or VIEWER)
»» updatedAtstringtruenoneLast update timestamp
»» createdAtstringtruenoneCreation timestamp
»» adsAccountobjecttruenoneAd account information
»»» accountIdstringtruenoneAd account ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
HTTP Status Code 500
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways false for error responses
» errorobjecttruenoneError details
»» codestringtruenoneError code (INTERNAL_ERROR)
»» messagestringtruenoneError message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code
» pathstringfalsenoneRequest path

POST Revoke ad account#

POST /{teamId}/ads-accounts/revoke
This endpoint is used to revoke ad account permission for specific user in a team. This can be done by team admin only.
Body Parameters
{
  "adAccountId": "string",
  "externalUserId": "string"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» adAccountIdbodystringyesThe ad account ID given by Google or Facebook
» externalUserIdbodystringyesThe 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» datanulltruenoneResponse data (null for revoke operations)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Change ad account#

POST /{teamId}/ads-accounts/change-permission
This endpoint is used to change permission for team member permission to specific ad account. This can be done by team admin only.
Body Parameters
{
  "adAccountId": "act_483489024830589",
  "externalUserId": "1",
  "permission": "VIEWER"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» adAccountIdbodystringyesAd account ID
» externalUserIdbodystringyesExternal user ID
» permissionbodystringyesNew permission level (MANAGER or VIEWER)

Enum#

NameValue
» permissionMANAGER
» permissionVIEWER
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Meta#

GET Import#

GET /{teamId}/meta/import
Here you can Import your ad account data (campaigns, adset, ads) , make faster retrival and less rate limiting.

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam id
adAccountIdquerystringnoYou facebook ad account id
x-api-keyheaderstringnonone
Response Examples
200 Response
{
  "success": true,
  "data": { ... },
  "message": "Request successful",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data (varies by endpoint)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Facebook pages#

GET /{teamId}/meta/pages
Here you can get your Facebook pages IDs.

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
adAccountIdquerystringnoYour Facebook ad account ID
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
Response Examples
200 Response
{
  "success": true,
  "data": { ... },
  "message": "Request successful",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data (varies by endpoint)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Targeting Search#

POST /{teamId}/meta/targeting/search
Search for targeting options (locations, interests, behaviors, etc.) for Meta ad campaigns.
Body Parameters
{
  "type": "location",
  "query": "New York"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
adAccountIdquerystringnoAd account ID (optional)
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)
bodybodyobjectyesnone
» typebodystringyesTargeting type (see enum below)
» querybodystringyesSearch query string

Enum#

NameValue
» typelocation
» typelocale
» typeinterest
» typebehavior
» typeeducationSchool
» typeeducationMajor
» typeworkEmployer
» typeworkPosition
» typefamilyStatus
» typelifeEvent
» typeindustry
» typeincome
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of targeting results
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get Ads#

GET /{teamId}/meta/ads
Get ads for a specific ad account. Supports filtering by ad ID, campaign ID, or adset ID.

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam ID
adAccountIdquerystringyesAd account ID
adIdquerystringnoSpecific ad ID(s), comma-separated
campaignIdquerystringnoCampaign ID(s), comma-separated - returns ads for these campaigns
adsetIdquerystringnoAdset ID(s), comma-separated - returns ads for these adsets
fieldsquerystringnoComma-separated list of fields to return (see enum below)
x-api-keyheaderstringyesThe api key for your application , You can get it from our platform
AuthorizationheaderstringyesBearer token (JWT access token)

Enum#

NameValue
fieldsid
fieldsadset
fieldsbid_amount
fieldscampaign
fieldscampaign_id
fieldsupdated_time
fieldscreated_time
fieldscreative
fieldsname
fieldsstatus
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of ads
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get AdSet#

GET /{teamId}/meta/adsets

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
campaignIdquerystringnoadsets for specific campaign or campaigns
adsetIdquerystringnosepcfic adset or adsets
fieldsquerystringnoThis is optional , if you dont specify fields we will return all fields
x-api-keyheaderstringnonone

Enum#

NameValue
fieldscampaign
fieldsadset_schedule
fieldsname
fieldsstatus
fieldseffective_status
fieldsbilling_event
fieldsoptimization_goal
fieldsbid_amount
fieldsbudget_remaining
fieldsdaily_budget
fieldslifetime_budget
fieldsstart_time
fieldsend_time
fieldscreated_time
fieldsupdated_time
fieldsattribution_spec
fieldstargeting
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of ad sets
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get AdCreative#

GET /{teamId}/meta/adcreatives

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
adcreativeIdquerystringnonone
fieldsquerystringnonone
x-api-keyheaderstringnonone
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of ad creatives
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

GET Get Insights#

GET /{teamId}/meta/insights

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
levelquerystringnoYou can call campaign with any avaliable breakdown , but you can call any other combination and it will be served from meta api directly
breakdownquerystringnoThis breakdowns are avaliable from our db for campaign level only if you want other level it will be served from meta
fieldsquerystringnoThis 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
startDatequerystringyesnone
endDatequerystringyesnone
x-api-keyheaderstringnonone

Enum#

NameValue
levelcampaign
levelad
leveladset
levelaccount
breakdowngender
breakdowncountry
breakdownage
breakdownpublisher_platform
breakdownimpression_device
fieldsimpressions
fieldsclicks
fieldsspend
fieldscpm
fieldscpc
fieldsactions
fieldsaction_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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of insights data (varies by level and breakdown)
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Meta/Campaigns#

GET Get Campaigns#

GET /{teamId}/meta/campaigns

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
campaignIdquerystringnonone
fieldsquerystringnonone
x-api-keyheaderstringnonone
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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataarraytruenoneArray of campaigns
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

PATCH Update Campaign Status#

PATCH /{teamId}/meta/campaign/{campaignId}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
campaignIdpathstringyesnone
adAccountIdquerystringyesnone
x-api-keyheaderstringnonone
Request Body:
FieldTypeRequiredDescription
statusenumYesPAUSED 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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneUpdated campaign data
»» idstringtruenoneCampaign ID
»» statusstringtruenoneUpdated status
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Create Traffic Campaign#

POST /{teamId}/meta/campaign/lead
This 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.
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"
  }
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
x-api-keyheaderstringnonone
bodybodyobjectyesnone
» campaignNamebodystringyesnone
» statusbodystringnoOptional (default PAUSED)
» budgetbodyintegeryesCampaign daily budget
» startDatebodystringnomust be in YYYY-MM-DD format
» endDatebodystringnomust be in YYYY-MM-DD format
» specialAdCategoriesbody[string]noOptional (default [NONE])
» specialAdCountrybody[string]noRequired if specialAdCategory is not NONE
» adSetNamebodystringyesnone
» audienceIdbody[string]nonone
» targetingbodyobjectyesnone
»» gendersbody[integer]noDefault ALL
»» ageMinbodyintegernonone
»» ageMaxbodyintegernonone
»» geoLocationsbody[object]yesnone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» excludedGeoLocationsbody[object]nonone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» interestsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» behaviorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» relationshipStatusesbody[integer]nonone
»» lifeEventsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» industriesbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» incomebody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» familyStatusesbodyobjectnonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationSchoolsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationStatusesbody[string]nonone
»» educationMajorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workEmployersbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workPositionsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» localesbody[number]nonone
» creativesbodyobjectyesnone
»» primaryTextbodystringyesnone
»» headlinebodystringyesnone
»» urlbodystringyesnone
»» callToActionbodystringyesnone
»» imageUrlbodystringyesnone
»» videoIdbodystringnonone
»» thumbnailUrlbodystringnonone
»» descriptionbodystringnonone
» pageidbodystringyesnone
» instagramActorIdbodystringnoRequired when conversion location is Instagram Direct
» optimizationGoalbodystringnonone
» conversionLocationbodystringnonone
» appIdbodystringnoRequired when conversionLocation === 'APP'
» objectStoreUrlbodystringyesRequired when conversionLocation === 'APP'

Enum#

NameValue
» statusACTIVE
» statusPAUSED
» specialAdCategoriesNONE
» specialAdCategoriesEMPLOYMENT
» specialAdCategoriesHOUSING
» specialAdCategoriesCREDIT
» specialAdCategoriesISSUES_ELECTIONS_POLITICS
» specialAdCategoriesONLINE_GAMBLING_AND_GAMING
» specialAdCategoriesFINANCIAL_PRODUCTS_SERVICES
»» genders0
»» genders1
»» genders2
»»» typecountry
»»» typeregion
»»» typecity
»»» typecountry
»»» typeregion
»»» typecity
»» educationStatuses1
»» educationStatuses2
»» educationStatuses3
»» educationStatuses4
»» educationStatuses5
»» educationStatuses6
»» educationStatuses7
»» educationStatuses8
»» educationStatuses9
»» educationStatuses10
»» educationStatuses11
»» educationStatuses12
»» educationStatuses13
»» callToActionSIGN_UP
»» callToActionGET_QUOTE
»» callToActionAPPLY_NOW
»» callToActionLEARN_MORE
»» callToActionDOWNLOAD
»» callToActionSUBSCRIBE
»» callToActionBOOK_TRAVEL
» optimizationGoalLINK_CLICKS
» optimizationGoalLANDING_PAGE_VIEWS
» conversionLocationWEBSITE
» conversionLocationAPP
» conversionLocationMESSENGER
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

POST Create Sales Campaign#

POST /{teamId}/meta/campaign/sales
This 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.
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"
  }
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
x-api-keyheaderstringnonone
bodybodyobjectyesnone
» campaignNamebodystringyesnone
» statusbodystringnoOptional (default PAUSED)
» budgetbodyintegeryesCampaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta).
» startDatebodystringnomust be in YYYY-MM-DD format
» endDatebodystringnomust be in YYYY-MM-DD format
» specialAdCategoriesbody[string]noRequired when running employment/housing/credit/etc (default [NONE])
» specialAdCountrybody[string]noRequired if specialAdCategory is not NONE, Countries where the special category applies.
» adSetNamebodystringyesnone
» audienceIdbody[string]noIDs of saved or custom audiences
» targetingbodyobjectyesnone
»» gendersbody[integer]noDefault ALL
»» ageMinbodyintegernonone
»» ageMaxbodyintegernonone
»» geoLocationsbody[object]yesnone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» excludedGeoLocationsbody[object]nonone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» interestsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» behaviorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» relationshipStatusesbody[integer]nonone
»» lifeEventsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» industriesbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» incomebody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» familyStatusesbodyobjectnonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationSchoolsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationStatusesbody[string]nonone
»» educationMajorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workEmployersbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workPositionsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» localesbody[number]nonone
» creativesbodyobjectyesnone
»» primaryTextbodystringyesMain body copy displayed above the creative.
»» headlinebodystringyesBold headline shown under the image/video.
»» urlbodystringyesLanding page or Messenger deep link.
»» callToActionbodystringyesCTA button label
»» imageUrlbodystringyesHTTPS URL to a 1.91:1 image.
»» videoIdbodystringnoExisting Meta video ID
»» thumbnailUrlbodystringnoRequired when supplying `videoId
»» descriptionbodystringnoSupporting text below the headline.
» pageidbodystringyesPage representing the brand running the ads.
» instagramActorIdbodystringnoInstagram Business Account ID for IG messaging/placements.
» pixelIdbodystringyesMeta Pixel ID firing purchase events.
» conversionEventbodystringyesStandard event Meta optimizes for
» catalogIdbodystringnoCommerce catalog ID
» productSetIdbodystringnoSubset of a catalog
» customConversionIdbodystringnonone

Enum#

NameValue
» statusACTIVE
» statusPAUSED
» specialAdCategoriesNONE
» specialAdCategoriesEMPLOYMENT
» specialAdCategoriesHOUSING
» specialAdCategoriesCREDIT
» specialAdCategoriesISSUES_ELECTIONS_POLITICS
» specialAdCategoriesONLINE_GAMBLING_AND_GAMING
» specialAdCategoriesFINANCIAL_PRODUCTS_SERVICES
»» genders0
»» genders1
»» genders2
»»» typecountry
»»» typeregion
»»» typecity
»»» typecountry
»»» typeregion
»»» typecity
»» educationStatuses1
»» educationStatuses2
»» educationStatuses3
»» educationStatuses4
»» educationStatuses5
»» educationStatuses6
»» educationStatuses7
»» educationStatuses8
»» educationStatuses9
»» educationStatuses10
»» educationStatuses11
»» educationStatuses12
»» educationStatuses13
»» callToActionSIGN_UP
»» callToActionGET_QUOTE
»» callToActionAPPLY_NOW
»» callToActionLEARN_MORE
»» callToActionDOWNLOAD
»» callToActionSUBSCRIBE
»» callToActionBOOK_TRAVEL
» conversionEventPURCHASE
» conversionEventADD_TO_CART
» conversionEventINITIATE_CHECKOUT
» conversionEventSUBSCRIBE
» conversionEventCOMPLETE_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
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneCreated campaign data
»» campaignIdstringtruenoneCreated campaign ID
»» adSetIdstringtruenoneCreated ad set ID
»» adIdstringtruenoneCreated ad ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Responses#

HTTP Status CodeMeaningDescriptionData schema
201CreatednoneInline

Responses Data Schema#

HTTP Status Code 201
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneCreated campaign data
»» campaignIdstringtruenoneCreated campaign ID
»» adSetIdstringtruenoneCreated ad set ID
»» adIdstringtruenoneCreated ad ID
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

POST Create Awareness Campaign#

POST /{teamId}/meta/campaign/awareness
This 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.
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"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
x-api-keyheaderstringnonone
bodybodyobjectyesnone
» campaignNamebodystringyesnone
» statusbodystringnoOptional (default PAUSED)
» budgetbodyintegeryesCampaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta).
» startDatebodystringnomust be in YYYY-MM-DD format
» endDatebodystringnomust be in YYYY-MM-DD format
» specialAdCategoriesbody[string]noRequired when running employment/housing/credit/etc (default [NONE])
» specialAdCountrybody[string]noRequired if specialAdCategory is not NONE, Countries where the special category applies.
» adSetNamebodystringyesnone
» audienceIdbody[string]noIDs of saved or custom audiences
» targetingbodyobjectyesnone
»» gendersbody[integer]noDefault ALL
»» ageMinbodyintegernonone
»» ageMaxbodyintegernonone
»» geoLocationsbody[object]yesnone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» excludedGeoLocationsbody[object]nonone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» interestsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» behaviorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» relationshipStatusesbody[integer]nonone
»» lifeEventsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» industriesbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» incomebody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» familyStatusesbodyobjectnonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationSchoolsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationStatusesbody[string]nonone
»» educationMajorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workEmployersbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workPositionsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» localesbody[number]nonone
» creativesbodyobjectyesnone
»» primaryTextbodystringyesMain body copy displayed above the creative.
»» headlinebodystringyesBold headline shown under the image/video.
»» urlbodystringyesLanding page or Messenger deep link.
»» callToActionbodystringyesCTA button label
»» imageUrlbodystringyesHTTPS URL to a 1.91:1 image.
»» videoIdbodystringnoExisting Meta video ID
»» thumbnailUrlbodystringnoRequired when supplying `videoId
»» descriptionbodystringnoSupporting text below the headline.
» pageidbodystringyesPage representing the brand running the ads.
» instagramActorIdbodystringnoInstagram Business Account ID for IG messaging/placements.
» pixelIdbodystringyesMeta Pixel ID firing purchase events.
» conversionEventbodystringyesStandard event Meta optimizes for
» catalogIdbodystringnoCommerce catalog ID
» productSetIdbodystringnoSubset of a catalog
» customConversionIdbodystringnonone

Enum#

NameValue
» statusACTIVE
» statusPAUSED
» specialAdCategoriesNONE
» specialAdCategoriesEMPLOYMENT
» specialAdCategoriesHOUSING
» specialAdCategoriesCREDIT
» specialAdCategoriesISSUES_ELECTIONS_POLITICS
» specialAdCategoriesONLINE_GAMBLING_AND_GAMING
» specialAdCategoriesFINANCIAL_PRODUCTS_SERVICES
»» genders0
»» genders1
»» genders2
»»» typecountry
»»» typeregion
»»» typecity
»»» typecountry
»»» typeregion
»»» typecity
»» educationStatuses1
»» educationStatuses2
»» educationStatuses3
»» educationStatuses4
»» educationStatuses5
»» educationStatuses6
»» educationStatuses7
»» educationStatuses8
»» educationStatuses9
»» educationStatuses10
»» educationStatuses11
»» educationStatuses12
»» educationStatuses13
»» callToActionSIGN_UP
»» callToActionGET_QUOTE
»» callToActionAPPLY_NOW
»» callToActionLEARN_MORE
»» callToActionDOWNLOAD
»» callToActionSUBSCRIBE
»» callToActionBOOK_TRAVEL
» conversionEventPURCHASE
» conversionEventADD_TO_CART
» conversionEventINITIATE_CHECKOUT
» conversionEventSUBSCRIBE
» conversionEventCOMPLETE_REGISTRATION
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

POST Create Engagement Campaign#

POST /{teamId}/meta/campaign/engagement
This 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.
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"
  }
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
x-api-keyheaderstringnonone
bodybodyobjectyesnone
» campaignNamebodystringyesnone
» statusbodystringnoOptional (default PAUSED)
» budgetbodyintegeryesCampaign Daily budget in dollars. Must be ≥ 1 (service multiplies by 100 before sending to Meta).
» startDatebodystringnomust be in YYYY-MM-DD format
» endDatebodystringnomust be in YYYY-MM-DD format
» specialAdCategoriesbody[string]noRequired when running employment/housing/credit/etc (default [NONE])
» specialAdCountrybody[string]noRequired if specialAdCategory is not NONE, Countries where the special category applies.
» adSetNamebodystringyesnone
» audienceIdbody[string]noIDs of saved or custom audiences
» targetingbodyobjectyesnone
»» gendersbody[integer]noDefault ALL
»» ageMinbodyintegernonone
»» ageMaxbodyintegernonone
»» geoLocationsbody[object]yesnone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» excludedGeoLocationsbody[object]nonone
»»» typebodystringyesnone
»»» idbodystringyesnone
»» interestsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» behaviorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» relationshipStatusesbody[integer]nonone
»» lifeEventsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» industriesbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» incomebody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» familyStatusesbodyobjectnonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationSchoolsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» educationStatusesbody[string]nonone
»» educationMajorsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workEmployersbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» workPositionsbody[object]nonone
»»» idbodystringyesnone
»»» namebodystringnonone
»» localesbody[number]nonone
» creativesbodyobjectyesnone
»» primaryTextbodystringyesMain body copy displayed above the creative.
»» headlinebodystringyesBold headline shown under the image/video.
»» urlbodystringyesLanding page or Messenger deep link.
»» callToActionbodystringyesCTA button label
»» imageUrlbodystringyesHTTPS URL to a 1.91:1 image.
»» videoIdbodystringnoExisting Meta video ID
»» thumbnailUrlbodystringnoRequired when supplying `videoId
»» descriptionbodystringnoSupporting text below the headline.
» pageidbodystringyesPage representing the brand running the ads.
» instagramActorIdbodystringnoInstagram Business Account ID for IG messaging/placements.
» pixelIdbodystringyesMeta Pixel ID firing purchase events.
» conversionEventbodystringyesStandard event Meta optimizes for
» catalogIdbodystringnoCommerce catalog ID
» productSetIdbodystringnoSubset of a catalog
» customConversionIdbodystringnonone

Enum#

NameValue
» statusACTIVE
» statusPAUSED
» specialAdCategoriesNONE
» specialAdCategoriesEMPLOYMENT
» specialAdCategoriesHOUSING
» specialAdCategoriesCREDIT
» specialAdCategoriesISSUES_ELECTIONS_POLITICS
» specialAdCategoriesONLINE_GAMBLING_AND_GAMING
» specialAdCategoriesFINANCIAL_PRODUCTS_SERVICES
»» genders0
»» genders1
»» genders2
»»» typecountry
»»» typeregion
»»» typecity
»»» typecountry
»»» typeregion
»»» typecity
»» educationStatuses1
»» educationStatuses2
»» educationStatuses3
»» educationStatuses4
»» educationStatuses5
»» educationStatuses6
»» educationStatuses7
»» educationStatuses8
»» educationStatuses9
»» educationStatuses10
»» educationStatuses11
»» educationStatuses12
»» educationStatuses13
»» callToActionSIGN_UP
»» callToActionGET_QUOTE
»» callToActionAPPLY_NOW
»» callToActionLEARN_MORE
»» callToActionDOWNLOAD
»» callToActionSUBSCRIBE
»» callToActionBOOK_TRAVEL
» conversionEventPURCHASE
» conversionEventADD_TO_CART
» conversionEventINITIATE_CHECKOUT
» conversionEventSUBSCRIBE
» conversionEventCOMPLETE_REGISTRATION
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Meta/Lead Form#

GET Get Page Lead forms#

GET /{teamId}/meta/lead-form

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam id
adAccountIdquerystringnoYour facebook ad account id
pageIdquerystringnoYour Facebook page id
x-api-keyheaderstringnonone
Response Examples
200 Response
{
  "data": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» data[object]truenonenone
»» idstringfalsenonenone
»» namestringfalsenonenone

POST Create Page Lead form#

POST /{teamId}/meta/lead-form
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"]
  }
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam id
adAccountIdquerystringnoYour facebook ad account id
x-api-keyheaderstringnonone
bodybodyobjectyesnone
» pageIdbodystringyesPage id
» questionsbody[object]yesnone
»» typebodystringyesnone
»» labelbodystringyesnone
»» optionsbody[object]yesnone
»»» valuebodystringyesnone
»»» keybodystringyesnone
» privacyPolicyUrlbodystringyesnone
» privacyPolicyNamebodystringyesnone
» namebodystringyesnone
» thankYouPagebodyobjectyesnone
»» titlebodystringyesnone
»» bodybodystringyesnone
»» buttonTextbodystringyesnone
»» buttonTypebodystringyesnone
»» websiteUrlbodystringnorequired only if button type is VIEW_WEBSITE
»» countryCodebodystringyesrequired only if button type is CALL_BUSINESS or WHATSAPP and should be ISO31661Alpha2
»» businessPhoneNumberbodystringyesrequired only if button type is CALL_BUSINESS or WHATSAPP
» languagebodystringyesnone
» introPagebodyobjectnonone
»» titlebodystringyesnone
»» stylebodystringyesnone
»» contentbody[string]yesnone

Enum#

NameValue
»» typeCUSTOM
»» typeCITY
»» typeCOMPANY_NAME
»» typeCOUNTRY
»» typeDOB
»» typeEMAIL
»» typeGENDER
»» typeFIRST_NAME
»» typeFULL_NAME
»» typeJOB_TITLE
»» typeLAST_NAME
»» typeMARITIAL_STATUS
»» typeWHATSAPP_NUMBER
»» typeEDUCATION_LEVEL
»» typeWEBSITE
»» typePHONE
»» typePHONE_OTP
»» typePOST_CODE
»» typePROVINCE
»» typeRELATIONSHIP_STATUS
»» typeSTATE
»» typeSTREET_ADDRESS
»» typeZIP
»» typeWORK_EMAIL
»» typeMILITARY_STATUS
»» buttonTypeVIEW_WEBSITE
»» buttonTypeCALL_BUSINESS
»» buttonTypeMESSAGE_BUSINESS
»» buttonTypeDOWNLOAD
»» buttonTypeSCHEDULE_APPOINTMENT
»» buttonTypeVIEW_ON_FACEBOOK
»» buttonTypePROMO_CODE
»» buttonTypeNONE
»» buttonTypeWHATSAPP
» languageAR_AR
» languageCS_CZ
» languageDA_DK
» languageDE_DE
» languageEL_GR
» languageEN_GB
» languageEN_US
» languageES_ES
» languageES_LA
» languageFI_FI
» languageFR_FR
» languageHE_IL
» languageHI_IN
» languageHU_HU
» languageID_ID
» languageIT_IT
» languageJA_JP
» languageKO_KR
» languageNB_NO
» languageNL_NL
» languagePL_PL
» languagePT_BR
» languagePT_PT
» languageRO_RO
» languageRU_RU
» languageSV_SE
» languageTH_TH
» languageTR_TR
» languageVI_VN
» languageZH_CN
» languageZH_HK
» languageZH_TW
»» styleLIST_STYLE
»» stylePARAGRAPH_STYLE
Response Examples
200 Response
{
  "success": true,
  "data": {
    "id": "string"
  },
  "message": "Request successful",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» successbooleantruenoneAlways true for successful responses
» dataobjecttruenoneResponse data
»» idstringtruenonethe id of the lead forms
» messagestringfalsenoneSuccess message
» timestampstringtruenoneISO 8601 timestamp
» statusCodeintegertruenoneHTTP status code

Meta/Pixels#

GET Get Pixels#

GET /{teamId}/meta/pixels

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam id
adAccountIdquerystringyesYour facebook ad account id
x-api-keyheaderstringyesnone
Response Examples
200 Response
{
  "data": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

HTTP Status Code 200
NameTypeRequiredRestrictionsTitledescription
» data[object]truenonenone
»» idstringfalsenonenone
»» namestringfalsenonenone

POST Create Pixel#

POST /{teamId}/meta/pixels
Body Parameters
{
  "name": "Test Pixel",
  "description": "Created via API"
}

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesTeam id
adAccountIdquerystringnoYour facebook ad account id
x-api-keyheaderstringyesnone
bodybodyobjectyesnone
» namebodystringyesnone
» descriptionbodystringyesnone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Meta/Audience#

GET Get Saved Audience#

GET /{teamId}/meta/savedAudience

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
x-api-keyheaderstringyesnone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET Get Custom Audience#

GET /{teamId}/meta/customAudience

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringyesnone
x-api-keyheaderstringyesnone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Test#

POST Untitled Endpoint#

POST /act_483489024830589/campaigns

Params#

NameLocationTypeRequiredDescription
access_tokenquerystringnonone
namequerystringnonone
objectivequerystringnonone
statusquerystringnonone
special_ad_categoriesqueryarray[string]nonone
is_adset_budget_sharing_enabledquerystringnonone
bid_strategyquerystringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET Untitled Endpoint Copy#

GET /act_483489024830589/campaigns

Params#

NameLocationTypeRequiredDescription
access_tokenquerystringnonone
fieldsquerystringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET Untitled Endpoint#

GET /v24.0/act_483489024830589/campaigns

Params#

NameLocationTypeRequiredDescription
access_tokenquerystringnonone
limitquerystringnonone
afterquerystringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Google#

GET list accessible customers#

GET /{teamId}/google/list-accessible-accounts

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
x-api-keyheaderstringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET import#

GET /{teamId}/google/import

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
x-api-keyheaderstringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET insights#

GET /{teamId}/google/insights

Params#

NameLocationTypeRequiredDescription
teamIdpathstringyesnone
adAccountIdquerystringnonone
fieldsqueryarray[string]nonone
startDatequerystringnonone
endDatequerystringnonone
levelquerystringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

GET Assets#

GET /teamId}/google/assets

Params#

NameLocationTypeRequiredDescription
adAccountIdquerystringnonone
fieldsqueryarray[string]nonone
levelquerystringnonone
Response Examples
200 Response
{
  "success": true,
  "data": null,
  "message": "Admin changed successfully",
  "timestamp": "2025-12-15T10:30:00.000Z",
  "statusCode": 200
}

Responses#

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema#

Data Schema#

CreateWorkspaceDto#

{
  "name": "string"
}

Attribute#

NameTypeRequiredRestrictionsTitleDescription
namestringtruenoneThe full name of the user registering for the workspace.

CreateConnectionDto#

{
  "platform": "string",
  "teamId": "string"
}

Attribute#

NameTypeRequiredRestrictionsTitleDescription
platformstringtruenoneThe advertising platform to connect with.
teamIdstringtruenoneThe unique UUID of the team initiating the platform connection.

AddMemberDto#

{
  "name": "string",
  "email": "string",
  "password": "string",
  "workspaceName": "string",
  "externalUserId": "string"
}

Attribute#

NameTypeRequiredRestrictionsTitleDescription
namestringtruenoneThe full name of the user registering for the application.
emailstringtruenoneThe user’s valid email address, used as a unique identifier for login and communication.
passwordstringtruenoneThe user’s chosen password. It must meet security standards such as including uppercase and lowercase letters, numbers, and special characters.
workspaceNamestringtruenoneThe name of the workspace to be created for the new user.
externalUserIdstringtruenoneA 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
Previous
Assets
Built with