---
agentTools:
  projectIndex: https://kosmo.readme.io/llms.txt
---

# Create merchant

You can use this endpoint to create a new merchant. Please, reach out to us if you want to use this endpoint.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "developer@kosmo.delivery",
      "name": "Kosmo API Support"
    },
    "description": "Kosmo API Reference v2",
    "termsOfService": "https://www.kosmo.delivery/",
    "title": "Kosmo API Reference v2",
    "version": "2.0"
  },
  "paths": {
    "/v2/orgs/merchants": {
      "post": {
        "description": "You can use this endpoint to create a new merchant. Please, reach out to us if you want to use this endpoint.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMerchantRequest"
              }
            }
          },
          "description": "Create merchant body",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMerchantResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/kosmoerr.ErrorPayloadDTO"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/kosmoerr.ErrorPayloadDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/kosmoerr.ErrorPayloadDTO"
                }
              }
            }
          }
        },
        "summary": "Create merchant",
        "tags": [
          "Merchants"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.kosmo.delivery",
      "description": "Kosmo API URL"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "token"
      }
    },
    "schemas": {
      "kosmoerr.ErrorPayloadDTO": {
        "properties": {
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/kosmoerr.ErrorDetailDTO"
            }
          },
          "key": {
            "description": "Error key.",
            "type": "string",
            "example": "invalid_request_error"
          },
          "message": {
            "description": "Error message.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "kosmoerr.ErrorDetailDTO": {
        "properties": {
          "key": {
            "description": "Error key.",
            "type": "string",
            "example": "invalid_phone_number"
          },
          "message": {
            "description": "Error message.",
            "type": "string",
            "example": "invalid phone number: Phone"
          },
          "field": {
            "description": "Error field.",
            "type": "string",
            "example": "CreateQuotesRequest.Dropoffs[0].Receiver.Phone"
          }
        },
        "type": "object"
      },
      "CreateMerchantRequest": {
        "required": [
          "merchantId"
        ],
        "properties": {
          "merchantId": {
            "description": "This is your merchant reference id. You can use UUID or any other unique id. You will use it for placing orders.",
            "type": "string",
            "example": "my-merchant-id"
          },
          "name": {
            "type": "string",
            "example": "Apple Store"
          },
          "phone": {
            "type": "string",
            "example": "+6512345678"
          },
          "email": {
            "type": "string",
            "example": "merchant@kosmo.delivery"
          }
        },
        "type": "object"
      },
      "CreateMerchantResponse": {
        "properties": {
          "merchantId": {
            "description": "This is your merchant reference id. You can use UUID or any other unique id. You will use it for placing orders.",
            "type": "string",
            "example": "apple"
          }
        },
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 136,
      "2": 86,
      "3": 191,
      "4": 139,
      "5": 245,
      "6": 189,
      "7": 0,
      "8": 16,
      "9": 17,
      "10": 176,
      "11": 113
    }
  }
}
```