Square · Schema
CreateDeviceCodeRequest
BookingLocationSquareRestaurantCatalogCheckoutCustomersDisputesE-CommerceFinancial TechnologyGift CardsInventoryInvoicingLaborLoyaltyMerchantsOrderPaymentsPoint-of-SaleRefundsRetailSubscriptionTeamWebhookPayment ProcessingPayment Terminals
Properties
| Name | Type | Description |
|---|---|---|
| idempotency_key | string | A unique string that identifies this CreateDeviceCode request. Keys can be any valid string but must be unique for every CreateDeviceCode request. See [Idempotency keys](https://developer.squareup.com |
| device_code | object | The device code to create. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/square/main/json-schema/square-create-device-code-request-schema.json",
"title": "CreateDeviceCodeRequest",
"x-generated": "2026-10-12",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/square-devices-api-openapi.yml#/components/schemas/CreateDeviceCodeRequest",
"type": "object",
"x-release-status": "PUBLIC",
"required": [
"idempotency_key",
"device_code"
],
"properties": {
"idempotency_key": {
"type": "string",
"description": "A unique string that identifies this CreateDeviceCode request. Keys can\nbe any valid string but must be unique for every CreateDeviceCode request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.",
"minLength": 1,
"maxLength": 128
},
"device_code": {
"$ref": "#/$defs/DeviceCode",
"description": "The device code to create."
}
},
"$defs": {
"DeviceCode": {
"type": "object",
"x-release-status": "PUBLIC",
"required": [
"product_type"
],
"properties": {
"id": {
"type": "string",
"description": "The unique id for this device code.",
"readOnly": true
},
"name": {
"type": [
"string",
"null"
],
"description": "An optional user-defined name for the device code.",
"maxLength": 128
},
"code": {
"type": "string",
"description": "The unique code that can be used to login.",
"readOnly": true
},
"device_id": {
"type": "string",
"description": "The unique id of the device that used this code. Populated when the device is paired up.",
"readOnly": true
},
"product_type": {
"$ref": "#/$defs/ProductType",
"description": "The targeting product type of the device code."
},
"location_id": {
"type": [
"string",
"null"
],
"description": "The location assigned to this code.",
"maxLength": 50
},
"status": {
"$ref": "#/$defs/DeviceCodeStatus",
"description": "The pairing status of the device code.\nSee [DeviceCodeStatus](#type-devicecodestatus) for possible values",
"readOnly": true
},
"pair_by": {
"type": "string",
"description": "When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.",
"readOnly": true
},
"created_at": {
"type": "string",
"description": "When this DeviceCode was created. Timestamp in RFC 3339 format.",
"readOnly": true
},
"status_changed_at": {
"type": "string",
"description": "When this DeviceCode's status was last changed. Timestamp in RFC 3339 format.",
"readOnly": true
},
"paired_at": {
"type": "string",
"description": "When this DeviceCode was paired. Timestamp in RFC 3339 format.",
"readOnly": true
}
}
},
"DeviceCodeStatus": {
"type": "string",
"enum": [
"UNKNOWN",
"UNPAIRED",
"PAIRED",
"EXPIRED"
],
"x-enum-elements": [
{
"name": "UNKNOWN",
"description": "The status cannot be determined or does not exist."
},
{
"name": "UNPAIRED",
"description": "The device code is just created and unpaired."
},
{
"name": "PAIRED",
"description": "The device code has been signed in and paired to a device."
},
{
"name": "EXPIRED",
"description": "The device code was unpaired and expired before it was paired."
}
],
"description": "DeviceCode.Status enum.",
"x-release-status": "PUBLIC"
},
"ProductType": {
"type": "string",
"enum": [
"TERMINAL_API"
],
"x-enum-elements": [
{
"name": "TERMINAL_API",
"description": ""
}
],
"x-release-status": "PUBLIC"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.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.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/square-create-device-code-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
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.