arazzo: 1.0.1
info:
title: Gitea Create Organization With Webhook
summary: Create an organization and register an organization-level webhook.
description: >-
Stands up an organization wired for event delivery on Gitea. The workflow
creates an organization and registers an organization-level webhook so all
of the org's repositories deliver events to a single endpoint. Each step
spells out its request inline so the flow can be read and executed without
opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: organizationApi
url: ../openapi/gitea-organization-api-openapi.yml
type: openapi
workflows:
- workflowId: org-with-webhook
summary: Create an org and register an org-level webhook.
description: >-
Creates an organization, then registers a gitea-type webhook at the
organization level for push and repository events.
inputs:
type: object
required:
- authToken
- orgUsername
- webhookUrl
properties:
authToken:
type: string
description: Authorization header value, e.g. "token <personal-access-token>".
orgUsername:
type: string
description: Username (slug) of the organization to create.
orgFullName:
type: string
description: Display name of the organization.
webhookUrl:
type: string
description: Target URL the webhook delivers payloads to.
steps:
- stepId: createOrg
description: Create a new organization.
operationId: orgCreate
parameters:
- name: Authorization
in: header
value: $inputs.authToken
requestBody:
contentType: application/json
payload:
username: $inputs.orgUsername
full_name: $inputs.orgFullName
visibility: public
successCriteria:
- condition: $statusCode == 201
outputs:
orgId: $response.body#/id
orgName: $response.body#/username
- stepId: createOrgWebhook
description: Register a gitea-type webhook at the organization level.
operationId: orgCreateHook
parameters:
- name: Authorization
in: header
value: $inputs.authToken
- name: org
in: path
value: $inputs.orgUsername
requestBody:
contentType: application/json
payload:
type: gitea
active: true
events:
- push
- repository
config:
url: $inputs.webhookUrl
content_type: json
successCriteria:
- condition: $statusCode == 201
outputs:
hookId: $response.body#/id
outputs:
orgId: $steps.createOrg.outputs.orgId
hookId: $steps.createOrgWebhook.outputs.hookId
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.