Themen-API
Themen-Mitgliedschaften über authentifizierte Endpunkte verwalten.
Themen-Mitgliedschaften über authentifizierte Endpunkte verwalten.
Authentifizierung
Diese Endpunkte erfordern einen API-Key mit dem Scope topics:write, übergeben als Bearer-Token:
Authorization: Bearer <key>
Anfragen ohne gültigen Key liefern 401; Anfragen mit einem Key ohne den Scope topics:write liefern 403.
Endpunkte
| Methode | Pfad | Beschreibung |
|---|---|---|
POST | /api/v1/topics/:topicId/contacts | Kontakt zum Thema hinzufügen |
DELETE | /api/v1/topics/:topicId/contacts/:emailOrId | Kontakt aus Thema entfernen |
Kontakt zum Thema hinzufügen
POST /api/v1/topics/:topicId/contacts
Der Body akzeptiert entweder email oder contactId:
{
"email": "jane@example.com"
}
oder
{
"contactId": "j57..."
}
Erfolgsantwort (201 Created):
{
"data": {
"success": true,
"contactId": "j57...",
"topicId": "k19...",
"doiStatus": "pending"
}
}
doiStatus kann folgende Werte annehmen:
not_requiredpendingconfirmed
Kontakt aus Thema entfernen
DELETE /api/v1/topics/:topicId/contacts/:emailOrId
emailOrId kann eine URL-kodierte E-Mail-Adresse oder eine Kontakt-ID sein.
Erfolgsantwort (200 OK):
{
"data": {
"success": true,
"removed": true
}
}