# Create Profile

Create a new profile.
If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`

**Scopes:**
`Profiles Write`

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Klaviyo API",
    "version": "2023-01-24",
    "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.",
    "contact": {
      "name": "Klaviyo Developer Experience Team",
      "email": "developers@klaviyo.com",
      "url": "https://developers.klaviyo.com"
    },
    "termsOfService": "https://www.klaviyo.com/legal/api-terms",
    "license": {
      "name": "License",
      "url": "https://www.klaviyo.com/legal"
    }
  },
  "paths": {
    "/api/profiles/": {
      "post": {
        "operationId": "create_profile",
        "summary": "Create Profile",
        "description": "Create a new profile.\nIf you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`\n\n**Scopes:**\n`Profiles Write`",
        "parameters": [
          {
            "name": "revision",
            "in": "header",
            "required": true,
            "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
            "schema": {
              "type": "string",
              "default": "2023-01-24"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostProfileResponse"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/ClientError",
            "description": ""
          },
          "5XX": {
            "$ref": "#/components/responses/ServerError",
            "description": ""
          }
        },
        "tags": [
          "Profiles"
        ],
        "x-klaviyo-ratelimit": {
          "burst": "75/s",
          "steady": "700/m"
        },
        "x-klaviyo-scopes": [
          "Profiles Write"
        ],
        "x-klaviyo-pre-release": "None",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileCreateQuery"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProfileLocation": {
        "type": "object",
        "properties": {
          "address1": {
            "type": "string",
            "example": "89 E 42nd St",
            "description": "First line of street address",
            "default": "89 E 42nd St"
          },
          "address2": {
            "type": "string",
            "example": "1st floor",
            "description": "Second line of street address",
            "default": "1st floor"
          },
          "city": {
            "type": "string",
            "example": "New York",
            "description": "City name",
            "default": "New York"
          },
          "country": {
            "type": "string",
            "example": "United States",
            "description": "Country name",
            "default": "United States"
          },
          "latitude": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "example": "40.7128",
            "description": "Latitude coordinate. We recommend providing a precision of four decimal places.",
            "default": "40.7128"
          },
          "longitude": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "example": "74.0060",
            "description": "Longitude coordinate. We recommend providing a precision of four decimal places.",
            "default": "74.0060"
          },
          "region": {
            "type": "string",
            "example": "NY",
            "description": "Region within a country, such as state or province",
            "default": "NY"
          },
          "zip": {
            "type": "string",
            "example": "10017",
            "description": "Zip code",
            "default": "10017"
          },
          "timezone": {
            "type": "string",
            "example": "America/New_York",
            "description": "Time zone name. We recommend using time zones from the IANA Time Zone Database.",
            "default": "America/New_York"
          }
        }
      },
      "EmailMarketingSuppression": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "example": "HARD_BOUNCE",
            "description": "The reason the profile was suppressed from the list.",
            "default": "HARD_BOUNCE"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2023-02-21T20:07:38+00:00",
            "description": "The timestamp when the profile was suppressed from the list, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).",
            "default": "2023-02-21T20:07:38+00:00"
          }
        },
        "required": [
          "reason",
          "timestamp"
        ]
      },
      "EmailMarketingListSuppression": {
        "type": "object",
        "properties": {
          "list_id": {
            "type": "string",
            "example": "Y6nRLr",
            "description": "The ID of list to which the suppression applies.",
            "default": "Y6nRLr"
          },
          "reason": {
            "type": "string",
            "example": "USER_SUPPRESSED",
            "description": "The reason the profile was suppressed from the list.",
            "default": "USER_SUPPRESSED"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2023-02-21T20:07:38+00:00",
            "description": "The timestamp when the profile was suppressed from the list, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).",
            "default": "2023-02-21T20:07:38+00:00"
          }
        },
        "required": [
          "list_id",
          "reason",
          "timestamp"
        ]
      },
      "EmailMarketing": {
        "type": "object",
        "properties": {
          "consent": {
            "type": "string",
            "example": "SUBSCRIBED",
            "description": "The consent status for email marketing.",
            "default": "SUBSCRIBED"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2023-02-21T20:07:38+00:00",
            "description": "The timestamp when consent record or updated for email marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).",
            "default": "2023-02-21T20:07:38+00:00"
          },
          "method": {
            "type": "string",
            "example": "PREFERENCE_PAGE",
            "description": "The method by which the profile was subscribed to email marketing.",
            "default": "PREFERENCE_PAGE"
          },
          "method_detail": {
            "type": "string",
            "example": "mydomain.com/signup",
            "description": "Additional details about the method by which the profile was subscribed to SMS marketing. This may be empty if no details were provided.",
            "default": "mydomain.com/signup"
          },
          "custom_method_detail": {
            "type": "string",
            "example": "marketing drive",
            "description": "Additional detail provided by the caller when the profile was subscribed. This may be empty if no details were provided.",
            "default": "marketing drive"
          },
          "double_optin": {
            "type": "boolean",
            "example": "True",
            "description": "Whether the profile was subscribed to email marketing using a double opt-in.",
            "default": "True"
          },
          "suppressions": {
            "$ref": "#/components/schemas/EmailMarketingSuppression",
            "description": "The global email marketing suppressions for this profile."
          },
          "list_suppressions": {
            "$ref": "#/components/schemas/EmailMarketingListSuppression",
            "description": "The list suppressions for this profile."
          }
        },
        "required": [
          "consent",
          "method"
        ]
      },
      "EmailChannel": {
        "type": "object",
        "properties": {
          "marketing": {
            "$ref": "#/components/schemas/EmailMarketing",
            "description": "The email marketing subscription."
          }
        }
      },
      "SMSMarketing": {
        "type": "object",
        "properties": {
          "consent": {
            "type": "string",
            "example": "SUBSCRIBED",
            "description": "The consent status for SMS marketing.",
            "default": "SUBSCRIBED"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2023-02-21T20:07:38+00:00",
            "description": "The timestamp when consent record or updated for SMS marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).",
            "default": "2023-02-21T20:07:38+00:00"
          },
          "method": {
            "type": "string",
            "example": "TEXT",
            "description": "The method by which the profile was subscribed to SMS marketing.",
            "default": "TEXT"
          },
          "method_detail": {
            "type": "string",
            "example": "JOIN",
            "description": "Additional details about the method which the profile was subscribed to SMS marketing. This may be empty if no details were provided.",
            "default": "JOIN"
          }
        },
        "required": [
          "consent",
          "timestamp",
          "method",
          "method_detail"
        ]
      },
      "SMSChannel": {
        "type": "object",
        "properties": {
          "marketing": {
            "$ref": "#/components/schemas/SMSMarketing",
            "description": "The SMS marketing subscription."
          }
        }
      },
      "Subscriptions": {
        "type": "object",
        "properties": {
          "email": {
            "$ref": "#/components/schemas/EmailChannel",
            "description": "The email channel subscription."
          },
          "sms": {
            "$ref": "#/components/schemas/SMSChannel",
            "description": "The SMS channel subscription."
          }
        }
      },
      "ProfileCreateQueryAsSubResource": {
        "type": "object",
        "required": [
          "type",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "profile"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "example": "sarah.mason@klaviyo-demo.com",
                "description": "Individual's email address",
                "default": "sarah.mason@klaviyo-demo.com"
              },
              "phone_number": {
                "type": "string",
                "example": "+15005550006",
                "description": "Individual's phone number in E.164 format",
                "default": "+15005550006"
              },
              "external_id": {
                "type": "string",
                "example": "63f64a2b-c6bf-40c7-b81f-bed08162edbe",
                "description": "A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.",
                "default": "63f64a2b-c6bf-40c7-b81f-bed08162edbe"
              },
              "first_name": {
                "type": "string",
                "example": "Sarah",
                "description": "Individual's first name",
                "default": "Sarah"
              },
              "last_name": {
                "type": "string",
                "example": "Mason",
                "description": "Individual's last name",
                "default": "Mason"
              },
              "organization": {
                "type": "string",
                "example": "Klaviyo",
                "description": "Name of the company or organization within the company for whom the individual works",
                "default": "Klaviyo"
              },
              "title": {
                "type": "string",
                "example": "Engineer",
                "description": "Individual's job title",
                "default": "Engineer"
              },
              "image": {
                "type": "string",
                "example": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
                "description": "URL pointing to the location of a profile image",
                "default": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg"
              },
              "location": {
                "$ref": "#/components/schemas/ProfileLocation"
              },
              "properties": {
                "type": "object",
                "example": {
                  "pseudonym": "Dr. Octopus"
                },
                "description": "An object containing key/value pairs for any custom properties assigned to this profile",
                "default": {
                  "pseudonym": "Dr. Octopus"
                }
              }
            }
          }
        }
      },
      "ProfileCreateQuery": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProfileCreateQueryAsSubResource"
          }
        }
      },
      "PostProfileResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "type",
              "id",
              "attributes",
              "links"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "profile"
                ]
              },
              "id": {
                "type": "string",
                "example": "01GDDKASAP8TKDDA2GRZDSVP4H",
                "description": "Primary key that uniquely identifies this profile. Generated by Klaviyo.",
                "default": "01GDDKASAP8TKDDA2GRZDSVP4H"
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "example": "sarah.mason@klaviyo-demo.com",
                    "description": "Individual's email address",
                    "default": "sarah.mason@klaviyo-demo.com"
                  },
                  "phone_number": {
                    "type": "string",
                    "example": "+15005550006",
                    "description": "Individual's phone number in E.164 format",
                    "default": "+15005550006"
                  },
                  "external_id": {
                    "type": "string",
                    "example": "63f64a2b-c6bf-40c7-b81f-bed08162edbe",
                    "description": "A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.",
                    "default": "63f64a2b-c6bf-40c7-b81f-bed08162edbe"
                  },
                  "first_name": {
                    "type": "string",
                    "example": "Sarah",
                    "description": "Individual's first name",
                    "default": "Sarah"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Mason",
                    "description": "Individual's last name",
                    "default": "Mason"
                  },
                  "organization": {
                    "type": "string",
                    "example": "Klaviyo",
                    "description": "Name of the company or organization within the company for whom the individual works",
                    "default": "Klaviyo"
                  },
                  "title": {
                    "type": "string",
                    "example": "Engineer",
                    "description": "Individual's job title",
                    "default": "Engineer"
                  },
                  "image": {
                    "type": "string",
                    "example": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
                    "description": "URL pointing to the location of a profile image",
                    "default": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg"
                  },
                  "created": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-11-08T00:00:00",
                    "description": "Date and time when the profile was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)",
                    "default": "2022-11-08T00:00:00"
                  },
                  "updated": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-11-08T00:00:00",
                    "description": "Date and time when the profile was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)",
                    "default": "2022-11-08T00:00:00"
                  },
                  "last_event_date": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-11-08T00:00:00",
                    "description": "Date and time of the most recent event the triggered an update to the profile, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)",
                    "default": "2022-11-08T00:00:00"
                  },
                  "location": {
                    "$ref": "#/components/schemas/ProfileLocation"
                  },
                  "properties": {
                    "type": "object",
                    "example": {
                      "pseudonym": "Dr. Octopus"
                    },
                    "description": "An object containing key/value pairs for any custom properties assigned to this profile",
                    "default": {
                      "pseudonym": "Dr. Octopus"
                    }
                  },
                  "subscriptions": {
                    "$ref": "#/components/schemas/Subscriptions"
                  }
                }
              },
              "links": {
                "$ref": "#/components/schemas/ObjectLinks"
              }
            }
          }
        }
      },
      "ObjectLinks": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "self"
        ]
      }
    },
    "responses": {
      "ClientError": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "errors"
              ],
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Client Error"
      },
      "ServerError": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "errors"
              ],
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Server Error"
      }
    },
    "securitySchemes": {
      "Klaviyo-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`<br>For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#authentication",
        "x-default": "Klaviyo-API-Key your-private-api-key"
      }
    }
  },
  "servers": [
    {
      "url": "https://a.klaviyo.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "Klaviyo-API-Key": []
    }
  ],
  "tags": [
    {
      "name": "Profiles",
      "description": "profiles"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 209,
      "2": 144,
      "3": 188,
      "4": 105,
      "5": 115,
      "6": 190,
      "7": 0,
      "8": 46,
      "9": 217,
      "10": 40,
      "11": 67
    }
  }
}
```