Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_BEARER_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Get a bearer token from the POST /v1/auth/login endpoint.
Authentication
Token Authentication
Register
Create a new account and issue a Sanctum bearer token.
Example request:
curl --request POST \
"http://localhost/v1/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Jane Doe\",
\"email\": \"jane@example.com\",
\"password\": \"password123\",
\"device_name\": \"ios-app\"
}"
const url = new URL(
"http://localhost/v1/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Jane Doe",
"email": "jane@example.com",
"password": "password123",
"device_name": "ios-app"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Registration succeeded.):
{
"data": {
"id": "",
"type": "users",
"attributes": {
"name": "Alexandra Salvador",
"email": "miguel.sevilla@example.com",
"email_verified_at": "2026-03-19T08:50:09+00:00",
"created_at": null,
"updated_at": null
}
},
"meta": {
"token": "1|example-token",
"token_type": "Bearer",
"expires_at": null
}
}
Example response (422, Validation failed.):
{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email has already been taken."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Login
Authenticate a user and issue a Sanctum bearer token.
Example request:
curl --request POST \
"http://localhost/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"jane@example.com\",
\"password\": \"password123\",
\"device_name\": \"ios-app\"
}"
const url = new URL(
"http://localhost/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "jane@example.com",
"password": "password123",
"device_name": "ios-app"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Login succeeded.):
{
"data": {
"id": "",
"type": "users",
"attributes": {
"name": "Alexandra Salvador",
"email": "gallego.adrian@example.com",
"email_verified_at": "2026-03-19T08:50:09+00:00",
"created_at": null,
"updated_at": null
}
},
"meta": {
"token": "1|example-token",
"token_type": "Bearer",
"expires_at": null
}
}
Example response (422, Credentials were invalid.):
{
"message": "The given data was invalid.",
"errors": {
"email": [
"The provided credentials are incorrect."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Current User
requires authentication
Return the authenticated user for the current bearer token.
Example request:
curl --request GET \
--get "http://localhost/v1/auth/me" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/auth/me"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Authenticated user profile.):
{
"data": {
"id": "",
"type": "users",
"attributes": {
"name": "Omar Domínguez",
"email": "arredondo.juana@example.com",
"email_verified_at": "2026-03-19T08:50:09+00:00",
"created_at": null,
"updated_at": null
}
}
}
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout
requires authentication
Revoke the current Sanctum token.
Example request:
curl --request POST \
"http://localhost/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (204, Token revoked.):
Empty response
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Tokens
requires authentication
List personal access tokens for the authenticated user.
Example request:
curl --request GET \
--get "http://localhost/v1/auth/tokens" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/auth/tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Token list payload.):
{
"data": [
{
"id": "1",
"type": "personal-access-tokens",
"attributes": {
"name": "ios-app",
"abilities": [
"auth:me",
"auth:logout"
],
"last_used_at": null,
"expires_at": "2026-02-24T12:00:00+00:00",
"created_at": "2026-02-23T12:00:00+00:00",
"updated_at": "2026-02-23T12:00:00+00:00",
"is_current": true
}
}
]
}
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Example response (403, Token is missing required ability.):
{
"message": "Forbidden."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revoke All Tokens
requires authentication
Revoke all personal access tokens for the authenticated user.
Example request:
curl --request DELETE \
"http://localhost/v1/auth/tokens" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/auth/tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204, All tokens revoked.):
Empty response
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Example response (403, Token is missing required ability.):
{
"message": "Forbidden."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revoke Token
requires authentication
Revoke one personal access token owned by the authenticated user.
Example request:
curl --request DELETE \
"http://localhost/v1/auth/tokens/42" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token_id\": 16
}"
const url = new URL(
"http://localhost/v1/auth/tokens/42"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token_id": 16
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (204, Token revoked.):
Empty response
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Example response (403, Token is missing required ability.):
{
"message": "Forbidden."
}
Example response (404, Token does not belong to current user or no longer exists.):
{
"message": "Token not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Password Reset
Request Password Reset
Send a password reset link to the provided email if an account exists.
Example request:
curl --request POST \
"http://localhost/v1/auth/password/forgot" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"jane@example.com\"
}"
const url = new URL(
"http://localhost/v1/auth/password/forgot"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "jane@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Password reset request accepted.):
{
"message": "If the account exists, a password reset link has been sent."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Password
Reset the user password using a valid reset token.
Example request:
curl --request POST \
"http://localhost/v1/auth/password/reset" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"reset-token-value\",
\"email\": \"jane@example.com\",
\"password\": \"new-password123\",
\"password_confirmation\": \"new-password123\"
}"
const url = new URL(
"http://localhost/v1/auth/password/reset"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "reset-token-value",
"email": "jane@example.com",
"password": "new-password123",
"password_confirmation": "new-password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Password reset succeeded.):
{
"message": "Your password has been reset."
}
Example response (422, Reset token or payload was invalid.):
{
"message": "The given data was invalid.",
"errors": {
"email": [
"This password reset token is invalid."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Read Reset Token Payload
Return reset token and email payload for API clients handling email reset links.
Example request:
curl --request GET \
--get "http://localhost/v1/auth/password/reset/reset-token-value?email=jane%40example.com" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"architecto\",
\"email\": \"zbailey@example.net\"
}"
const url = new URL(
"http://localhost/v1/auth/password/reset/reset-token-value"
);
const params = {
"email": "jane@example.com",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "architecto",
"email": "zbailey@example.net"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Reset payload data.):
{
"token": "reset-token-value",
"email": "jane@example.com"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Email Verification
Verify Email
Verify a user email using the signed verification link parameters.
Example request:
curl --request GET \
--get "http://localhost/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"architecto\",
\"hash\": \"ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqld\"
}"
const url = new URL(
"http://localhost/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"id": "architecto",
"hash": "ngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqld"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Email was verified.):
{
"message": "Email verified successfully."
}
Example response (403, Signed URL was invalid, expired, or mismatched.):
{
"message": "Invalid verification link."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send Verification Email
requires authentication
Send (or resend) an email verification link to the authenticated user.
Example request:
curl --request POST \
"http://localhost/v1/auth/email/verification-notification" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/auth/email/verification-notification"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Verification email queued/sent.):
{
"message": "Verification link sent."
}
Example response (200, User already verified.):
{
"message": "Email is already verified."
}
Example response (401, Authentication failed.):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Handle the incoming request.
Example request:
curl --request GET \
--get "http://localhost/v1/properties/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/v1/properties/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Properties
Property Lookup
Get Property by Address
requires authentication
Retrieve property data by sending the address string.
Example request:
curl --request POST \
"http://localhost/v1/properties/address" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address\": \"Calle Mayor 123, Madrid\",
\"page\": 1,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/v1/properties/address"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address": "Calle Mayor 123, Madrid",
"page": 1,
"per_page": 20
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Properties retrieved successfully.):
{
"status": "success",
"data": {
"properties": [
{
"id": "01ABC...",
"direccion": "Calle Mayor 123, Madrid"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 100,
"last_page": 5
}
}
}
Example response (404, Property with the given address was not found.):
{
"status": "error",
"error": {
"code": "NOT_FOUND",
"message": "Property not found"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Properties by Zip Code
requires authentication
Retrieve properties by sending a zip code. Returns multiple properties if available.
Example request:
curl --request POST \
"http://localhost/v1/properties/zip" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"zip\": \"41001\",
\"page\": 1,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/v1/properties/zip"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"zip": "41001",
"page": 1,
"per_page": 20
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Properties retrieved successfully.):
{
"status": "success",
"data": {
"properties": [
{
"id": "01ABC...",
"direccion": "Calle Mayor",
"codigo_postal": "41001"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 100,
"last_page": 5
}
}
}
Example response (404, No properties found with the given zip code.):
{
"status": "error",
"error": {
"code": "NOT_FOUND",
"message": "No properties found for this zip code"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Properties by Cadastral Reference
requires authentication
Retrieve properties by sending a cadastral reference. Returns one or more properties if available.
Example request:
curl --request POST \
"http://localhost/v1/properties/cadastral" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cadastral_reference\": \"1234567VG1234A0001BG\",
\"page\": 1,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/v1/properties/cadastral"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cadastral_reference": "1234567VG1234A0001BG",
"page": 1,
"per_page": 20
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Properties retrieved successfully.):
{
"status": "success",
"data": {
"properties": [
{
"id": "01ABC...",
"direccion": "Calle Mayor",
"referencia_catastral": "1234567VG1234A0001BG"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 100,
"last_page": 5
}
}
}
Example response (404, No properties found with the given cadastral reference.):
{
"status": "error",
"error": {
"code": "NOT_FOUND",
"message": "No properties found for this cadastral reference"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Properties by Province
requires authentication
Retrieve properties by sending a province name. Returns multiple properties if available.
Example request:
curl --request POST \
"http://localhost/v1/properties/province" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"province\": \"Sevilla\",
\"page\": 1,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/v1/properties/province"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"province": "Sevilla",
"page": 1,
"per_page": 20
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Properties retrieved successfully.):
{
"status": "success",
"data": {
"properties": [
{
"id": "01ABC...",
"direccion": "Calle Mayor",
"provincia": "Sevilla"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 100,
"last_page": 5
}
}
}
Example response (404, No properties found with the given province.):
{
"status": "error",
"error": {
"code": "NOT_FOUND",
"message": "No properties found for this province"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Properties by Municipality
requires authentication
Retrieve properties by sending a municipality name. Returns multiple properties if available.
Example request:
curl --request POST \
"http://localhost/v1/properties/municipality" \
--header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"municipality\": \"Camas\",
\"page\": 1,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/v1/properties/municipality"
);
const headers = {
"Authorization": "Bearer {YOUR_BEARER_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"municipality": "Camas",
"page": 1,
"per_page": 20
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Properties retrieved successfully.):
{
"status": "success",
"data": {
"properties": [
{
"id": "01ABC...",
"direccion": "Calle Mayor",
"municipio": "Camas"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 100,
"last_page": 5
}
}
}
Example response (404, No properties found with the given municipality.):
{
"status": "error",
"error": {
"code": "NOT_FOUND",
"message": "No properties found for this municipality"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.