Authentication

The Platica API uses Bearer token authentication. You must include your API Key in the Authorization header of every HTTP request.


Header format

Authorization: Bearer pl_key_xxxxxxxxxxxxx

Get your API Key

You can generate your API Key directly from the Platica dashboard, with no need to contact the support team.

  1. Open settings — From the Platica dashboard, go to Settings and select the API Keys section.

  2. Create a new API Key — Click Create new API Key and enter a descriptive name to identify it.

  3. Save your API Key — The API Key is shown only once. Copy it and store it somewhere safe; you won't be able to see it again.

  4. Configure your requests — Include the API Key in the header of every request you make to the API.


Example authenticated request

curl -X GET "https://api.platica.mx/v1/agents" \
  -H "Authorization: Bearer pl_key_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json"

Important considerations

Your API Key has access only to the workspace it was created in. This means:

  • You can only manage agents, customers, and conversations within that workspace.
  • It will not have access to other workspaces, even if your account belongs to them.
  • If you need to access several workspaces via the API, you must generate an API Key in each one.

Authentication errors

If your API Key is invalid or missing, you'll receive a 401 Unauthorized error:

{
  "code": 401,
  "error": "Unauthorized",
  "details": "Invalid or missing API key"
}

See the Errors section for more information on error handling.