---
updatedAt: 2026-10-29T08:22:22.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Create target

Creates a webhook target or callback URL for listening to events. The webhook target can be used to listen to multiple events from multiple accounts.

> 👍 How to use this endpoint
>
> To see an example request, click **Examples** in the payload on the right.

> 📘 Only `https://` URLs are accepted. Sending the same URL again creates a second target; it doesn't return an error.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Yotpo API V3",
    "description": "Yotpo API V3 endpoints on api.yotpo.com. Webhook events are defined separately, in webhooks.json.",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://api.yotpo.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Your Yotpo account access token. See [Authentication](https://core-api.yotpo.com/reference/yotpo-authentication) to learn how to generate your access token."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized. The access token is missing, invalid or expired. With an invalid or expired `X-Yotpo-Token` the body is plain text: generate a new token with [Generate access token](ref:yotpo-authentication). A request with an `Authorization` header and no `X-Yotpo-Token` gets `Bad token; invalid JSON` as JSON: send the token in `X-Yotpo-Token`. An `Authorization` header sent along with a valid `X-Yotpo-Token` is ignored.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string",
              "example": "unauthorized"
            }
          },
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error message.",
                  "example": "Bad token; invalid JSON"
                }
              }
            },
            "examples": {
              "Authorization header without X-Yotpo-Token": {
                "value": "{\n  \"message\": \"Bad token; invalid JSON\"\n}"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden. The request has no `X-Yotpo-Token` header.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error message.",
                  "example": "Forbidden"
                }
              }
            },
            "examples": {
              "Missing token": {
                "value": "{\n  \"message\": \"Forbidden\"\n}"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "paths": {
    "/core/v3/stores/{store_id}/webhooks/targets": {
      "post": {
        "summary": "Create target",
        "description": "Creates a webhook target or callback URL for listening to events. The webhook target can be used to listen to multiple events from multiple accounts.",
        "operationId": "create-target",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "description": "The store ID (app_key)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "webhook_target"
                ],
                "properties": {
                  "webhook_target": {
                    "type": "object",
                    "description": "The callback URL listening to events",
                    "required": [
                      "url"
                    ],
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "The HTTPS URL that receives the events. Only `https://` URLs are accepted.",
                        "default": "https://www.waverider.com/"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "webhook_target": {
                      "url": "https://example.com/webhooks/yotpo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "examples": {
                  "Created": {
                    "value": "{\n    \"webhook_target\": {\n        \"yotpo_id\": 1234\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook_target": {
                      "type": "object",
                      "properties": {
                        "yotpo_id": {
                          "type": "integer",
                          "example": 1234,
                          "default": 0,
                          "description": "The Yotpo ID of the target. Use it as `target_id` in a subscription."
                        }
                      },
                      "description": "The created target."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Unexpected input": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"unexpected input: <reason>\"\n    }\n  ]\n}"
                  },
                  "Missing <property> definition": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"webhook target is missing a <property> definition\"\n    }\n  ]\n}"
                  },
                  "Contains invalid value for <property>": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"webhook target contains an invalid value for <property>: <error-description>\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Unexpected input",
                      "type": "object",
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "message": {
                                "type": "string",
                                "example": "unexpected input: <reason>",
                                "description": "What's wrong with the request, usually naming the missing or invalid field. Meant for logs; the wording can change, so don't parse it."
                              }
                            }
                          },
                          "description": "The validation errors. Usually one item."
                        }
                      }
                    },
                    {
                      "title": "Missing <property> definition",
                      "type": "object",
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "message": {
                                "type": "string",
                                "example": "webhook target is missing a <property> definition",
                                "description": "What's wrong with the request, usually naming the missing or invalid field. Meant for logs; the wording can change, so don't parse it."
                              }
                            }
                          },
                          "description": "The validation errors. Usually one item."
                        }
                      }
                    },
                    {
                      "title": "Contains invalid value for <property>",
                      "type": "object",
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "message": {
                                "type": "string",
                                "example": "webhook target contains an invalid value for <property>: <error-description>",
                                "description": "What's wrong with the request, usually naming the missing or invalid field. Meant for logs; the wording can change, so don't parse it."
                              }
                            }
                          },
                          "description": "The validation errors. Usually one item."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "409",
            "content": {
              "application/json": {
                "examples": {
                  "Target already exists": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"webhook target already exists\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "type": "string",
                            "example": "webhook target already exists",
                            "description": "Says that an object with the same identifier already exists."
                          }
                        }
                      },
                      "description": "The errors. Usually one item."
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Unexpected error": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"unexpected error, try again later\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "type": "string",
                            "example": "unexpected error, try again later",
                            "description": "A general error message. Retry with backoff."
                          }
                        }
                      },
                      "description": "The errors. Usually one item."
                    }
                  }
                }
              }
            }
          }
        },
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [Retrieve targets](https://docs.yotpo.com/reference/retrieve-targets.md)
* [Retrieve target by ID](https://docs.yotpo.com/reference/retrieve-target-by-id.md)
* [Update target](https://docs.yotpo.com/reference/update-target.md)
* [Delete target](https://docs.yotpo.com/reference/delete-target.md)
* [Create filter](https://docs.yotpo.com/reference/create-filter.md)
* [Retrieve filters](https://docs.yotpo.com/reference/retrieve-filters.md)
* [Retrieve filter by ID](https://docs.yotpo.com/reference/retrieve-filter-by-id.md)
* [Update filter](https://docs.yotpo.com/reference/update-filter.md)
* [Delete filter](https://docs.yotpo.com/reference/delete-filter.md)
* [Create subscription](https://docs.yotpo.com/reference/create-subscription.md)
* [Retrieve subscriptions](https://docs.yotpo.com/reference/retrieve-subscriptions.md)
* [Retrieve subscription by ID](https://docs.yotpo.com/reference/retrieve-subscription-by-id.md)
* [Update subscription](https://docs.yotpo.com/reference/update-subscription.md)
* [Delete subscription](https://docs.yotpo.com/reference/delete-subscription.md)