Replyr Platform API

REST API for the Replyr operator console at app.replyr.ai. Covers business account details, admins and teams, tags, custom fields and bot fields, contacts (create, look up, tag, set fields), outbound messaging across the connected chat channels (text, file, product, flow and multi-action send_content), sales pipelines with stages, opportunities and comments, AI agents with their functions, files and configured MCP connections, appointment calendars, template installation, and an ecommerce cart, order and product surface. Authenticated with a single X-ACCESS-TOKEN API key header issued from the console.

OpenAPI Specification

replyrai-platform-api-swagger.json Raw ↑
{
  "swagger": "2.0",
  "info": {
    "version": "1.1",
    "title": "API Docs"
  },
  "tags": [
    {
      "name": "Accounts"
    },
    {
      "name": "Contacts"
    }
  ],
  "security": [
    {
        "APIKeyHeader": []
    }
  ],
  "paths": {
    "/accounts/me": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get business account details.",
        "operationId": "getAccountInformation",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                  "page_id": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "name": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "If false the admins of the bot can't access the dashboard."
                  },
                  "created": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Timestamp representing the date the bot was created"
                  },
                  "total_users": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The total number of contacts."
                  }
              }
            }            
          }
        }
      }
    },  
    "/accounts/admins": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all admins from a business account.",
        "operationId": "getAccountAdmins",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Admin"
              }
            }
          }
        }
      }
    },  
    "/accounts/teams": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all teams from a bot account.",
        "operationId": "getAccountTeams",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Team"
              }
            }
          }
        }
      }
    },
    "/accounts/tags": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all tags from a business account.",
        "operationId": "getAccountTags",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tag"
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "description": "Create a new tag",
        "operationId": "createTag",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "formData",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The the new tag ID."
                }
              },
              "example": {
                "id": 1995
              }
            }
          }
        }
      }
    },
    "/accounts/tags/{tag_id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get tag by id",
        "operationId": "getTagById",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Tag"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "description": "Delete a tag",
        "operationId": "deleteTag",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      }
    },
    "/accounts/tags/name/{tag_name}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get a tag by name",
        "operationId": "getTagByName",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "tag_name",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Tag"
            }
          }
        }
      }
    },
    "/accounts/flows": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all flows from a business account.",
        "operationId": "getAccountFlows",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/custom_fields": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all custom fields from a business account.",
        "operationId": "getAccountCustomFields",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "format": "int64"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "integer",
                    "description": "0 - Text, 1 - Number, 2- Date (Unix timestamp), 3 - Date & Time (Unix timestamp), 4 - Boolean(0 or 1)"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "description": "Create a custom field",
        "operationId": "createCustomField",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [          
          {
            "name": "content",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "required": true,
                  "type": "string"
                },
                "type": {
                  "type": "integer",
                  "required": true,
                  "enum": [0, 1, 2, 3, 4],
                  "description":"0 - text | 1 - number | 2 - date | 3 - datetime | 4 - true/false"
                },
                "isBotField": {
                  "type": "boolean",
                  "default": false,
                  "required": false
                },
                "value": {
                  "type": "string",
                  "required": false,
                  "description":"The value of the bot field. It is ignored for the contact custom field."
                },
                "description": {
                  "type": "string",
                  "required": false
                }
              },
              "example": {
                "name": "lead_score",
                "type": 1
              }
            }
          }
        ],       
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The ID of the new custom field"
                },
                "name": {
                  "type": "string"
                }
              },
              "example": {
                "id": 1995,
                "name":"lead_score"
              }
            }
          }
        }
      }
    },
    "/accounts/custom_fields/{custom_field_id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get custom field by id",
        "operationId": "getCustomFieldById",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "integer",
                  "description": "0 - Text, 1 - Number, 2- Date (Unix timestamp), 3 - Date & Time (Unix timestamp), 4 - Boolean(0 or 1)"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/custom_fields/name/{custom_field_name}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get custom field by name",
        "operationId": "getCustomFieldByName",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "custom_field_name",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "integer",
                  "description": "0 - Text, 1 - Number, 2- Date (Unix timestamp), 3 - Date & Time (Unix timestamp), 4 - Boolean(0 or 1)"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },"/accounts/bot_fields/{bot_field_id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get bot field value by id",
        "operationId": "getBFieldValue",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "bot_field_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id":{
                    "type": "integer"
                },
                "type": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "value":{
                  "type": "string"
                }
              },
              "example": {
                "id": 2334,
                "name": "age",
                "type": 1,
                "value": 25
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "description": "Set a bot field value",
        "operationId": "setBField",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "bot_field_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "value",
            "in": "formData",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "description": "Unset the value of a bot field",
        "operationId": "removeBField",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "bot_field_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      }
    },
    "/accounts/integrations": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "description": "Get all integrations from a business account.",
        "operationId": "getAccountIntegrations",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of available integrations and their status",
            "schema": {
              "type": "object",
              "properties": {
                "openai": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "gemini": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "claude": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "xai": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "deepseek": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "google_sheets": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                },
                "email": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "example": {
              "openai": { "active": true },
              "gemini": { "active": false },
              "claude": { "active": true },
              "xai": { "active": false },
              "deepseek": { "active": true },
              "google_sheets": { "active": false },
              "email": { "active": true }
            }
          }
        }
      }
    },    
    "/contacts/{contact_id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "description": "Get contact by contact id",
        "operationId": "getUserByName",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Contact"
            }
          },
          "400": {
            "description": "Invalid username supplied"
          },
          "404": {
            "description": "User not found"
          }
        }
      }
    },
    "/contacts/find_by_custom_field": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "description": "Find contacts by custom field value. It will return maximum 100 contacts. The results are sorted by the last custom field value update for a contact. ",
        "operationId": "findByCustomField",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "query",
            "required": true,
            "type": "string",
            "description": "Custom field ID. Use 'phone' or 'email' as custom field id if you want to find the contact by phone or email"
          },
          {
            "name": "value",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "properties": {                  
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Contact"
                    },
                    "maximum": "100"
                }
              },
              "type": "object"
            }
          },
          "400": {
            "description": "Invalid parameters"
          }
        }
      }
    },
    "/contacts/{contact_id}/tags": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "description": "Get all tags added to this contact",
        "operationId": "getUserTags",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Tag"
              }
            }
          }
        }
      }
    },
    "/contacts/{contact_id}/tags/{tag_id}": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Add a tag to the contact",
        "operationId": "addTagToUser",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "description": "remove a tag from the contact",
        "operationId": "removeTagFromUser",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      }
    },
    "/contacts": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Creates a new contact.",
        "operationId": "createNewContact",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [          
          {
            "name": "content",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "phone": {
                  "required": true,
                  "type": "string",
                  "description": "The phone number with country code"
                },
                "email": {
                  "required": false,
                  "type": "string",
                  "description": "The contact email"
                },
                "first_name": {
                  "type": "string",
                  "required": false
                },
                "last_name": {
                  "type": "string",
                  "required": false
                },
                "gender": {
                  "type": "string",
                  "required": false,
                  "enum": [
                    "male",
                    "female",
                    "unknown"
                  ]
                },
                "actions": {
                  "type": "array",
                  "required": false,
                  "description": "Actions can be send flow, add/remove tags, set/unset custom field ..."
                }
              },
              "example": {
                "phone": "+1234567890",
                "email":"test@test.com",
                "first_name": "John",
                "last_name": "Smith",
                "gender": "male",
                "actions":[{"action":"add_tag", "tag_name": "YOU_TAG_NAME"},{"action":"set_field_value", "field_name": "YOU_CUSTOM_FIELD_NAME","value":"ANY_VALUE"},{"action":"send_flow", "flow_id": 11111}]
              }
            }
          }
        ],
        "responses": {
          "default": {
            "description": "successful operation"
          }
        }
      }
    },
    "/contacts/{contact_id}/custom_fields": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "description": "Get all custom fields from a contact",
        "operationId": "getUserFields",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Custom_field"
              }
            }
          }
        }
      }
    },  
    "/contacts/{contact_id}/custom_fields/{custom_field_id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "description": "Get custom field value by id",
        "operationId": "getFieldValue",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "id":{
                    "type": "integer"
                },
                "type": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "value":{
                  "type": "string"
                }
              },
              "example": {
                "id": 2334,
                "name": "age",
                "type": 1,
                "value": 25
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Set a contact custom field",
        "operationId": "addFieldToUser",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "value",
            "in": "formData",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "description": "remove a custom field from the contact",
        "operationId": "removeFieldFromUser",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "custom_field_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      }
    },
    "/contacts/{contact_id}/send/{flow_id}": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Send a flow to contact",
        "operationId": "sendFlowToUser",
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "flow_id",
            "in": "path",
            "required": true,
            "type": "integer"
          }          
        ],
        "responses": {
          "default": {
            "description": "successful operation"
          }
        }
      }
    },
    "/contacts/{contact_id}/send/text": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Send text message to the contact",
        "operationId": "sendTextMessage",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          {
            "name": "content",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {                
                "text":{
                  "required": true,
                  "type": "string"
                },
                "channel":{
                  "required": false,
                  "type": "string",
                  "enum": ["messenger","whatsapp","sms","webchat","telegram","instagram","viber", "omnichannel"]
                }               
              },
              "example": {
                "text": "This is a text message",
                "channel": "messenger"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              },
              "example": {
                "success": true
              }
            }
          }
        }
      }
    },
    "/contacts/{contact_id}/send/file": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "description": "Send file",
        "operationId": "sendFile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "type": "integer"
          },
          

# --- truncated at 32 KB (95 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/replyrai/refs/heads/main/openapi/replyrai-platform-api-swagger.json