{
  "openapi": "3.0.4",
  "info": {
    "title": "Signalbox API",
    "description": "## Authentication\nSend an API key with every call, in the `x-api-key` header. Create a key in the app under API keys. A key belongs to one workspace and acts with the role of the person who created it.\n\n```\nx-api-key: your-api-key\n```\n\n## Rate limits\nCalls are limited per key. Over the limit the API answers `429 Too Many Requests` with a `Retry-After` header in seconds.",
    "contact": {
      "name": "Signalbox Team"
    },
    "version": "v1"
  },
  "paths": {
    "/api/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "The caller's workspace and role",
        "description": "Use it to check that a key works and to see which workspace it belongs to.",
        "responses": {
          "200": {
            "description": "The key's workspace id, workspace name and role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponseResponse"
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent, or the key is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls. Wait for the number of seconds in the Retry-After header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "MeResponse": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "description": "The workspace the key belongs to.",
            "format": "uuid"
          },
          "workspaceName": {
            "type": "string",
            "description": "The workspace's name.",
            "nullable": true
          },
          "role": {
            "type": "string",
            "description": "The role the key acts with in the workspace: admin, editor or basic.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What an API key is signed in as."
      },
      "MeResponseResponse": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "firstMessage": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/MeResponse"
          }
        },
        "additionalProperties": false
      },
      "StringResponse": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "firstMessage": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "data": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "An API key created in the app under API keys.",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ]
}