Ditto (dittowords.com) Variables API
The Variables API from Ditto (dittowords.com) — 1 operation(s) for variables.
The Variables API from Ditto (dittowords.com) — 1 operation(s) for variables.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dittowords:dittowords-variables-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Dittowords Variables API
version: 1.0.0
description: 'Operations tagged Variables across 2 of this provider''s published API definitions: dittowords-openapi-10-18-23-openapi.json, dittowords-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.dittowords.com/v1
- url: https://api.dittowords.com/v2
tags:
- name: Variables
paths:
/variables:
get:
tags:
- Variables
description: Returns the variables in the workspace of the requesting user.
summary: Fetch variables
security:
- ApiKeyAuth: []
responses:
'200':
description: A JSON body containing variable information from your workspace, keyed by variable name.
content:
application/json:
schema:
type: object
additionalProperties:
anyOf:
- type: object
properties:
example:
type: number
fallback:
anyOf:
- type: number
- type: string
required:
- example
- type: object
properties:
example:
type: string
fallback:
type: string
required:
- example
- type: object
properties:
text:
type: string
url:
type: string
required:
- text
- url
- type: array
items:
type: string
- type: object
additionalProperties:
type: string
operationId: getVariables
x-operation-id-source: derived
post:
tags:
- Variables
description: 'Creates variables in your workspace.
The shape of `data` depends on `type`: string and number take an `example` and an optional `fallback`, hyperlink takes `text` and `url`, list takes an array of strings, and map takes an object of string keys to string values.
Either every variable is created or none is.'
summary: Create variables
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
type: object
properties:
variables:
type: array
items:
oneOf:
- type: object
properties:
type:
type: string
enum:
- string
data:
type: object
properties:
example:
type: string
fallback:
type: string
required:
- example
name:
type: string
pattern: ^[A-Za-z0-9_]+$
description: The variable's name, which doubles as its developer ID. Letters, numbers, and underscores only, and unique within the workspace.
required:
- type
- data
- name
title: String
- type: object
properties:
type:
type: string
enum:
- number
data:
type: object
properties:
example:
anyOf:
- type: number
title: Number
- type: string
title: String
fallback:
anyOf:
- type: number
title: Number
- type: string
title: String
required:
- example
name:
type: string
pattern: ^[A-Za-z0-9_]+$
description: The variable's name, which doubles as its developer ID. Letters, numbers, and underscores only, and unique within the workspace.
required:
- type
- data
- name
title: Number
- type: object
properties:
type:
type: string
enum:
- hyperlink
data:
type: object
properties:
text:
type: string
url:
type: string
required:
- text
- url
name:
type: string
pattern: ^[A-Za-z0-9_]+$
description: The variable's name, which doubles as its developer ID. Letters, numbers, and underscores only, and unique within the workspace.
required:
- type
- data
- name
title: Hyperlink
- type: object
properties:
type:
type: string
enum:
- list
data:
type: array
items:
type: string
name:
type: string
pattern: ^[A-Za-z0-9_]+$
description: The variable's name, which doubles as its developer ID. Letters, numbers, and underscores only, and unique within the workspace.
required:
- type
- data
- name
title: List
- type: object
properties:
type:
type: string
enum:
- map
data:
type: object
additionalProperties:
type: string
name:
type: string
pattern: ^[A-Za-z0-9_]+$
description: The variable's name, which doubles as its developer ID. Letters, numbers, and underscores only, and unique within the workspace.
required:
- type
- data
- name
title: Map
minItems: 1
description: Array of new variables to create
required:
- variables
example:
variables:
- name: user_name
type: string
data:
example: Jane Doe
fallback: there
- name: help_link
type: hyperlink
data:
text: Learn more
url: https://dittowords.com
responses:
'200':
description: Returns the names of the created variables
content:
application/json:
schema:
type: object
properties:
names:
type: array
items:
type: string
description: Names of the created variables, in request order
required:
- names
example:
names:
- user_name
- help_link
'400':
description: 'Returned when the request body fails validation. Common causes include: a name that isn''t unique in the workspace, a name repeated within the request, or data that doesn''t match the variable''s type.'
content:
application/json:
schema:
type: object
properties:
message:
type: string
operationId: postVariables
x-operation-id-source: derived
patch:
tags:
- Variables
description: 'Renames variables or changes their type or value.
Either every update is applied or none is.'
summary: Update variables
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
type: object
properties:
updates:
type: array
items:
type: object
properties:
name:
type: string
description: The variable's current name, which is also its developer ID
newName:
type: string
pattern: ^[A-Za-z0-9_]+$
description: 'A new name for this variable. A variable''s name is its developer ID, so renaming it changes how it''s referenced: every {{placeholder}} using it is rewritten to match. If not provided, the name remains unchanged.'
type:
type: string
enum:
- string
- number
- hyperlink
- list
- map
description: A new type for this variable. Must be sent together with `data`, even when the value itself stays the same. If not provided, the type remains unchanged.
data:
anyOf:
- type: object
properties:
example:
anyOf:
- type: number
title: Number
- type: string
title: String
fallback:
anyOf:
- type: number
title: Number
- type: string
title: String
required:
- example
title: Number
- type: object
properties:
example:
type: string
fallback:
type: string
required:
- example
title: String
- type: object
properties:
text:
type: string
url:
type: string
required:
- text
- url
title: Hyperlink
- type: array
items:
type: string
title: List
- type: object
additionalProperties:
type: string
title: Map
description: The variable's new value. String and number variables have `example` and an optional `fallback`, and hyperlink variables have `text` and `url`; those fields are fixed, so sending only some of them leaves the rest as they were — send an empty string to clear one. A list variable's value is an array of strings, and a map variable's is an object of string keys to string values; that value is the variable's entire content, so what you send replaces it outright. If not provided, the value remains unchanged.
required:
- name
minItems: 1
description: Array of updates to variables
required:
- updates
example:
updates:
- name: user_name
newName: customer_name
- name: help_link
data:
text: Read the docs
url: https://dittowords.com/docs
responses:
'200':
description: Returns the variables that changed, and those already in the requested state
content:
application/json:
schema:
type: object
properties:
updated:
type: array
items:
type: string
description: Names of the variables that changed
unchanged:
type: array
items:
type: string
description: Names of the variables that were already in the requested state
required:
- updated
- unchanged
example:
updated:
- customer_name
unchanged:
- help_link
'400':
description: 'Returned when the request body fails validation. Common causes include: a name that isn''t unique in the workspace, a name repeated within the request, or data that doesn''t match the variable''s type.'
content:
application/json:
schema:
type: object
properties:
message:
type: string
'404':
description: Returned when a name doesn't match any variable in the workspace.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example:
message: 'Variable name not found: user_name'
operationId: patchVariables
x-operation-id-source: derived
delete:
tags:
- Variables
description: 'Permanently deletes variables from your workspace.
This can''t be undone, and either every variable in the request is deleted or none is.'
summary: Delete variables
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
type: object
properties:
names:
type: array
items:
type: string
minItems: 1
description: Names of the variables to delete, which are also their developer IDs. All must exist, and none can still be used by a text item or library component.
required:
- names
example:
names:
- user_name
- help_link
responses:
'200':
description: Returns the names of the deleted variables
content:
application/json:
schema:
type: object
properties:
names:
type: array
items:
type: string
description: Names of the deleted variables
required:
- names
example:
names:
- user_name
- help_link
'400':
description: Returned when a variable is still used by a text item or library component.
content:
application/json:
schema:
type: object
properties:
message:
type: string
'404':
description: Returned when a name doesn't match any variable in the workspace.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example:
message: 'Variable name not found: user_name'
operationId: deleteVariables
x-operation-id-source: derived
servers:
- url: https://api.dittowords.com/v1
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
x-refined-from:
- dittowords-openapi-10-18-23-openapi.json
- dittowords-openapi.json