{% extends "withnav_template.html" %} {% from "components/table.html" import list_table, field, hidden_field_heading %} {% from "components/api-key.html" import api_key %} {% block page_title %} API integration – GOV.UK Notify {% endblock %} {% block maincolumn_content %}

API integration

Create an API key
{% call(item, row_number) list_table( keys, empty_message="You haven’t created any API keys yet", caption="API keys", caption_visible=false, field_headings=[ 'API keys', hidden_field_heading('Action') ], ) %} {% call field() %}
{{ item.name }} {% if item.key_type == 'normal' %} Normal {% elif item.key_type == 'team' %} Only sends to team members {% elif item.key_type == 'test' %} Simulates sending messages {% endif %}
{% endcall %} {% if item.expiry_date %} {% call field(align='right') %} Revoked {{ item.expiry_date|format_datetime_short }} {% endcall %} {% else %} {% call field(align='right', status='error') %} Revoke {% endcall %} {% endif %} {% endcall %}
{{ api_key(current_service.id, "Service ID", thing="service ID") }}

API clients

{% endblock %}