Skip to main content

Address Management

Manage address book entries, including email addresses, names, companies, and phone numbers. This section outlines all endpoints available for creating, updating, retrieving, and deleting address records within an organization's address book.

Overview

The Address Management API enables the following operations:

  • Retrieve Addresses: Fetch a list of address entries for the organization.
  • Create or Update Addresses: Add new address entries or update existing ones.
  • Delete Address Entries: Remove addresses that are no longer needed.
  • Retrieve Audit Logs: Fetch audit logs for address book operations.
Note

All API requests require valid authentication headers for secure operations. Unauthorized requests will return a 401 Unauthorized error.

Endpoints

Retrieve Organization Addresses

Fetch all address entries associated with a specific organization.

Endpoint: GET /orgs/{org_id}/addresses

Parameters:

  • org_id (string, required): The unique identifier for the organization.

Example Response:

[
{
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"company": "Example Corp",
"phone_number": "+1-234-567-8901"
}
]

Create or Update Address Entry

Add a new address entry or update an existing one.

Endpoint: PUT /orgs/{org_id}/addresses/{email}

Parameters:

  • org_id (string, required): The unique identifier for the organization.
  • email (string, required): The email address of the contact.

Example Request:

{
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Inc",
"phone_number": "+1-987-654-3210"
}

Example Response:

{
"email": "jane.doe@example.com",
"first_name": "Jane",
"last_name": "Doe",
"company": "Example Inc",
"phone_number": "+1-987-654-3210"
}


Delete Address Entry

Add a new address entry or update an existing one.

Endpoint: DELETE /orgs/{org_id}/addresses/{email}

Parameters:

  • org_id (string, required): The unique identifier for the organization.
  • email (string, required): The email address of the contact.

Example Response:

{
"message": "Address entry deleted successfully"
}


Retrieve Address Audit Logs

Fetch audit logs for address-related operations.

Endpoint: GET /orgs/{org_id}/addresses_audit

Parameters:

  • org_id (string, required): The unique identifier for the organization.

Example Response:

{
"message": "Address entry deleted successfully"
}


API Response Codes

  • 200 OK: Request processed successfully.
  • 400 Bad Request: Invalid input or parameters.
  • 401 Unauthorized: Authentication failed or invalid API key.
  • 404 Not Found: Resource not found.
  • 500 Internal Server Error: An error occurred on the server.

Example Implementations

curl -X GET "https://api.locktera.com/orgs/{org_id}/addresses" -H "Authorization: Bearer YOUR_API_KEY"
Important Replace "YOUR_ACCESS_TOKEN" and "org_id" with actual values in your implementation.

API Response Codes

  • 200 OK: Successfully retrieved addresses.
  • 401 Unauthorized: Authentication failed or access token is invalid.
  • 404 Not Found: Organization or address not found.
  • 500 Internal Server Error: Server encountered an error while processing the request. For more information, visit the full API documentation at Locktera API Documentation.