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.
openapi: 3.2.0
info:
contact:
url: https://www.transcapi.com
description: 'Public transport data for Great Britain (England, Scotland and Wales): stops and places, bus and rail departures and arrivals with live running, routes and services, live bus positions, disruptions and journey planning. Every departure says in `source` whether its time is live or timetabled. Data is official open data; attribution requirements are at https://www.transcapi.com/docs/data-sources.'
termsOfService: https://www.transcapi.com/terms
title: TransC Alerts API
version: 1.0.0
servers:
- description: Production
url: https://api.transcapi.com
security:
- ApiKeyHeader: []
- ApiKeyQuery: []
tags:
- name: Alerts
paths:
/v1/alerts.json:
get:
responses:
'200':
description: Every alert on this API key
summary: List your push alerts
tags:
- Alerts
operationId: getV1AlertsJson
x-operation-id-source: derived
post:
description: 'TransCAPI POSTs signed JSON to your https URL when the condition is met. vehicle_approaching: a tracked bus is due at `atcocode` within `minutes` (1-30), optionally only `line`. disruption: a disruption newly matches `filters` (any of mode, severity, operator, line, atcocode, lat+lon+radius, planned). The response includes `secret`, shown once, for checking the X-TransCAPI-Signature header.'
requestBody:
content:
application/json:
schema:
properties:
atcocode:
type: string
description:
type: string
filters:
type: object
line:
type: string
minutes:
type: integer
type:
enum:
- vehicle_approaching
- disruption
type: string
url:
type: string
required:
- type
- url
type: object
responses:
'201':
description: The alert
with its secret: null
summary: Create a push alert (webhook)
tags:
- Alerts
operationId: postV1AlertsJson
x-operation-id-source: derived
/v1/alerts/{alert_id}.json:
delete:
parameters:
- in: path
name: alert_id
required: true
schema:
type: string
summary: Delete a push alert
tags:
- Alerts
operationId: deleteV1Alerts{alertId}Json
x-operation-id-source: derived
get:
parameters:
- in: path
name: alert_id
required: true
schema:
type: string
summary: A push alert and its last 20 deliveries
tags:
- Alerts
operationId: getV1Alerts{alertId}Json
x-operation-id-source: derived
/v1/alerts/{alert_id}/test.json:
post:
description: Delivers a `test` event straight away and reports what your server answered. Re-enables a paused alert if the test succeeds.
parameters:
- in: path
name: alert_id
required: true
schema:
type: string
summary: Send a test event to the alert's URL
tags:
- Alerts
operationId: postV1AlertsByAlertIdTestJson
x-operation-id-source: derived
components:
securitySchemes:
ApiKeyHeader:
in: header
name: X-Api-Key
type: apiKey
ApiKeyQuery:
in: query
name: api_key
type: apiKey