For the complete documentation index, see llms.txt. This page is also available as Markdown.

Variables

List Variables

get

Retrieves a paginated list of global variables for a specific connector. Can be filtered by label, key, and value. Note: In the Patchworks dashboard, a system is known as a connector.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[label]stringOptional

Filter results by label.

filter[key]stringOptional

Filter results by key.

filter[value]stringOptional

Filter results by value.

sortstringOptional

Sort field. Prefix with - for descending. Available: label, key, value

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/variables
GET /api/v1/variables HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "label": "My Label",
      "key": "example_key",
      "value": "example_value",
      "secret": "example_secret",
      "locked": "example_locked",
      "configurable": "example_configurable",
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z",
      "modified": "example_modified",
      "pivot": "example_pivot",
      "required": true,
      "advanced": true,
      "alias": "example_alias"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/variables",
    "per_page": 25,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/variables?page=1",
    "last": "https://api.example.com/api/v1/variables?page=1",
    "prev": null,
    "next": null
  }
}

Create Variable

post

Creates a new global variable for a connector. Note: In the Patchworks dashboard, a system is known as a connector.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

label

string

key

string

value

string

secret

locked

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
labelstringRequired
keystringRequired
valuestring · nullableOptional
secretstringOptional
lockedstringOptional
Responses
200

Successful response

application/json
post/api/v1/variables
POST /api/v1/variables HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 116

{
  "label": "My Label",
  "key": "example_key",
  "value": "example_value",
  "secret": "example_secret",
  "locked": "example_locked"
}
{
  "data": {
    "id": 1,
    "label": "My Label",
    "key": "example_key",
    "value": "example_value",
    "secret": "example_secret",
    "locked": "example_locked",
    "configurable": "example_configurable",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "modified": "example_modified",
    "pivot": "example_pivot",
    "required": true,
    "advanced": true,
    "alias": "example_alias"
  }
}

Get Variable

get

Retrieves the details of a specific global variable.

Available Filters

These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.

  • label

  • key

  • value

Available Sorts

These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.

  • label

  • key

  • value

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
variablestringRequired

The variable identifier.

Query parameters
filter[label]stringOptional

Filter results by label.

filter[key]stringOptional

Filter results by key.

filter[value]stringOptional

Filter results by value.

sortstringOptional

Sort field. Prefix with - for descending. Available: label, key, value

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/variables/{variable}
GET /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": 1,
    "label": "My Label",
    "key": "example_key",
    "value": "example_value",
    "secret": "example_secret",
    "locked": "example_locked",
    "configurable": "example_configurable",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "modified": "example_modified",
    "pivot": "example_pivot",
    "required": true,
    "advanced": true,
    "alias": "example_alias"
  }
}

Update Variable

put

Updates an existing global variable.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

label

string

key

string

value

string

configurable

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
variablestringRequired

The variable identifier.

Body
labelstringOptional
keystringOptional
valuestring · nullableOptional
configurablestringOptional
Responses
200

Successful response

application/json
put/api/v1/variables/{variable}
PUT /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "label": "My Label",
  "key": "example_key",
  "value": "example_value",
  "configurable": "example_configurable"
}
{
  "data": {
    "id": 1,
    "label": "My Label",
    "key": "example_key",
    "value": "example_value",
    "secret": "example_secret",
    "locked": "example_locked",
    "configurable": "example_configurable",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "modified": "example_modified",
    "pivot": "example_pivot",
    "required": true,
    "advanced": true,
    "alias": "example_alias"
  }
}

Delete Variable

delete

Permanently deletes a specific global variable.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
variablestringRequired

The variable identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/variables/{variable}
DELETE /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Action completed successfully."
}

Last updated

Was this helpful?