LogoFreestyle
API Reference/Git

Create a git trigger

Create a git trigger for the given repository.

POST
/git/v1/repo/{repo}/trigger

Request Body

application/jsonRequired
triggerRequiredobject
actionRequiredobject

Path Parameters

repoRequiredstring

The repository id

Format: "uuid"

Response Body

200

Trigger created successfully

triggerIdRequiredstring
Format: "uuid"

400

Invalid request

messageRequiredstring

403

User does not have permission to create a trigger on this repository

messageRequiredstring

404

Repository does not exist

messageRequiredstring

500

Internal server error

messageRequiredstring
curl -X POST "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/trigger" \
  -H "Content-Type: application/json" \
  -d '{
    "trigger": {
      "branches": [
        "string"
      ],
      "globs": [
        "string"
      ],
      "event": "push"
    },
    "action": {
      "endpoint": "string",
      "action": "webhook"
    }
  }'

Trigger created successfully

{
  "triggerId": "b89c9c0a-30c6-475a-b185-93813e22ffcf"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.