PATCH
/
api
/
v1
/
external-functions
/
{functionId}
curl --request PATCH \
  --url https://api.play.ai/api/v1/external-functions/{functionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-USER-ID: <api-key>' \
  --header 'content-type: <content-type>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "endpointUrl": "<string>",
  "method": "GET",
  "parameters": [
    {
      "type": "number",
      "name": "<string>",
      "description": "<string>",
      "id": "<string>",
      "parameterPosition": "body"
    }
  ]
}'
{
  "id": "f0gZrOKBKL7veJ6o1M",
  "name": "<string>",
  "description": "<string>",
  "endpointUrl": "<string>",
  "method": "GET",
  "parameters": [
    {
      "type": "number",
      "name": "<string>",
      "description": "<string>",
      "id": "<string>",
      "parameterPosition": "body"
    }
  ]
}

Authorizations

Authorization
string
header
required

Your secret API key from PlayAI, formatted as Bearer YOUR_SECRET_API_KEY.

X-USER-ID
string
header
required

Your unique user ID from PlayAI.

Headers

content-type
enum<string>
required
Available options:
application/json
accept
enum<string>
Available options:
application/json

Path Parameters

functionId
string
required

The external function's ID.

Example:

"f0gZrOKBKL7veJ6o1M"

Body

application/json
name
any
description
any
endpointUrl
any
method
any
parameters
any

Response

200 - application/json
External function resource response.
id
string

The unique ID for each external function.

Example:

"f0gZrOKBKL7veJ6o1M"

name
string
Maximum length: 250
description
string
Maximum length: 500
endpointUrl
string
Maximum length: 500
method
enum<string>
default:GET
Available options:
POST,
GET,
PUT,
DELETE
parameters
object[]