{% extends "withnav_template.html" %} {% from "components/table.html" import list_table, field, hidden_field_heading %} {% block page_title %} GOV.UK Notify | API keys and documentation {% endblock %} {% block maincolumn_content %}

API keys

To connect to the API you will need to create an API Key. Each service can have multiple API Keys to allow for test and live environments.

API usage is described in the developer documentation.

{{ banner( 'You can only send messages to yourself until you request to go live'.format( url_for('.service_request_to_go_live', service_id=service_id) )|safe, type='important' ) }}

Service ID

{{ service_id }}

{% call(item) list_table( keys, empty_message="You haven’t created any API keys yet", caption="API keys", caption_visible=False, field_headings=['Key name', hidden_field_heading('Action')] ) %} {% call field() %} {{ item.name }} {% endcall %} {% if item.expiry_date %} {% call field(align='right', status='default') %} Revoked {{ item.expiry_date|format_datetime }} {% endcall %} {% else %} {% call field(align='right', status='error') %} Revoke {% endcall %} {% endif %} {% endcall %}

Create a new API key

{% endblock %}