Sample EndpointsDispatch action

Dispatch action

Single endpoint that dispatches based on the action field in the body. Supported actions:

  • create_workspace
  • create_user
  • create_job
  • update_job
  • create_talent
  • add-task-reporting
curl -X POST "https://nufeegfofxlwnvlpvfgn.supabase.co/functions/v1/external-api" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "action": "create_workspace",
  "name": "Acme Corp",
  "language": "fr",
  "departments": [
    "Engineering",
    "Sales"
  ]
}'
{
  "success": true,
  "data": {}
}
POST
/external-api
POST
Bearer Token
Bearer Tokenstring
Required

Static token configured as EXTERNAL_API_TOKEN server-side.

Static token configured as EXTERNAL_API_TOKEN server-side.
Content-Typestring
Required

The media type of the request body

Options: application/json
No request body parameters defined
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Static token configured as EXTERNAL_API_TOKEN server-side.

Body

application/json
datastring
Required

Raw application/json data

Responses

successboolean
Required
Allowed values:true
dataobject
Required