{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://seemoai.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/accounts": {
      "get": {
        "responses": {
          "401": {
            "description": "Invalid API key"
          },
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Permission or plan restriction"
          }
        },
        "summary": "List connected accounts"
      }
    },
    "/me": {
      "get": {
        "responses": {
          "401": {
            "description": "Invalid API key"
          },
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Permission or plan restriction"
          }
        },
        "summary": "Account and subscription"
      }
    },
    "/posts/{id}/publish": {
      "post": {
        "responses": {
          "409": {
            "description": "Post cannot be published"
          },
          "202": {
            "description": "Submission processing or accepted"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "Submit a draft once"
      }
    },
    "/posts/{id}": {
      "delete": {
        "responses": {
          "401": {
            "description": "Invalid API key"
          },
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Permission or plan restriction"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "Cancel a draft or schedule"
      },
      "get": {
        "responses": {
          "401": {
            "description": "Invalid API key"
          },
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Permission or plan restriction"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "Read an API-created post"
      }
    },
    "/posts": {
      "get": {
        "responses": {
          "401": {
            "description": "Invalid API key"
          },
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Permission or plan restriction"
          }
        },
        "summary": "List API-created posts"
      },
      "post": {
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "maxLength": 100,
                    "type": "string"
                  },
                  "media": {
                    "type": "array",
                    "items": {
                      "format": "binary",
                      "type": "string"
                    },
                    "maxItems": 4
                  },
                  "text": {
                    "maxLength": 10000,
                    "type": "string"
                  },
                  "account_id": {
                    "type": "integer"
                  },
                  "scheduled_at": {
                    "type": "string",
                    "description": "Future timestamp with seconds and explicit timezone offset. Requires publish scope.",
                    "format": "date-time"
                  },
                  "tags": {
                    "maxLength": 2000,
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "text"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "integer"
                  },
                  "scheduled_at": {
                    "type": "string",
                    "description": "Future timestamp with seconds and explicit timezone offset. Requires publish scope.",
                    "format": "date-time"
                  },
                  "tags": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "text": {
                    "maxLength": 10000,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "text"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Idempotent replay"
          },
          "201": {
            "description": "Created"
          },
          "422": {
            "description": "Validation error"
          },
          "409": {
            "description": "Idempotency conflict"
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 8
            }
          }
        ],
        "summary": "Create a draft or scheduled post"
      }
    }
  },
  "info": {
    "version": "1.0.0",
    "description": "Create drafts, schedule and submit social posts. See /developers for limitations and usage.",
    "title": "SeemoAi Public API"
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
