Skip to main content
POST
/
auth
/
create_link
Ad Account Connection
curl --request POST \
  --url https://public.plai.io/auth/create_link \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "userId": "<string>",
  "platform": "<string>",
  "redirectUri": "<string>",
  "state": "<string>"
}
'
{
  "success": true,
  "results": {
    "success": true,
    "link": "<string>",
    "error": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://plai-a079b342.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Request Body

userId
string
required
User Id, If not already created, make a user on create user page first. If already created, retrieve the user ID from get profile page.
platform
string
required
For Facebook or Instagram, set platform = FACEBOOK, for LinkedIn, set platform = LINKEDIN, for Google, set platform = GOOGLE.
redirectUri
URL
The URL users are redirected to after linking their accounts
state
string
State, (if you want to send object make sure it is stringify)

Response

success
boolean
Indicates that the HTTP response was successful (status code 200 OK).
results
object