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

# Import Customer

This API allows you to add/update customers to your account.

**Required scopes**: import\_customer

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "TinyEmail API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.tinyemail.com/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/segment/customer": {
      "post": {
        "summary": "Import Customer",
        "description": "",
        "operationId": "getting-started-with-your-api",
        "parameters": [
          {
            "name": "segmentName",
            "in": "query",
            "description": "The name of the audience",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Cusomer email"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "Subscribed",
                      "Unsubscribed"
                    ]
                  },
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  },
                  "birthday": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "currency": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "province": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "address1": {
                    "type": "string"
                  },
                  "address2": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "ordersCount": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "totalSpent": {
                    "type": "number",
                    "format": "float"
                  },
                  "lastOrderName": {
                    "type": "string"
                  },
                  "lastOrderDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "lastOrderPrice": {
                    "type": "number",
                    "format": "float"
                  },
                  "source": {
                    "type": "string",
                    "description": "If you want to tag this cusomer with a specific source, where form it came."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "642debda6afdbc0027a3fb8f:642debda6afdbc0027a3fb92"
}
```