@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ZEIT API
@base https://api.zeit.co
@version v2019-01-07
@auth Bearer bearer | OAuth2
@endpoints 5
@toc integrations(3), domains(2)

@group integrations
@endpoint GET /v1/integrations/webhooks
@desc Get a list of existent webhooks
@optional {teamId: str # A team id in case you want to act on behalf of a team}
@returns(200) OK

@endpoint POST /v1/integrations/webhooks
@desc Create a new webhook
@required {name: str # A name to assign to the webhook, url: str # The URL ZEIT will post to when events happen}
@optional {teamId: str # A team id in case you want to act on behalf of a team}
@returns(201) {id: str, events: [str], url: str, name: str, configurationId: str, createdAt: int, ownerId: str} # OK

@endpoint DELETE /v1/integrations/webhooks/:id
@desc Remove a webhook by id
@optional {teamId: str # A team id in case you want to act on behalf of a team}
@returns(204) OK

@endgroup

@group domains
@endpoint GET /v4/domains
@desc Gets a list of domains registered for the authenticating user.
@optional {teamId: str # A team id in case you want to act on behalf of a team}
@returns(200) {domains: [map]} # OK

@endpoint GET /v4/domains/{name}
@desc Get a domain for the authenticated user by name
@required {name: str # A team id in case you want to act on behalf of a team}
@optional {teamId: str # A team id in case you want to act on behalf of a team}
@returns(200) {domain: map{boughtAt: int?, cdnEnabled: bool, createdAt: int?, expiresAt: int?, id: str, intendedNameservers: [str], name: str, nameservers: [str], nsVerifiedAt: int?, orderedAt: int?, serviceType: str, transferredAt: int?, txtVerifiedAt: int?, verificationRecord: str, verified: bool, suffix: bool, aliases: [map], certs: [map], creator: map{customerId: str, email: str, id: str, username: str, isDomainReseller: bool}}} # OK
@errors {404: Not Found}

@endgroup

@end
