Complete documentation for integrating with the YouMap platform
YouMap Public API allows you to integrate with our mapping platform to create, manage, and interact with location-based content.
Once you have your clientId
and clientSecret
, use them to authenticate and
get a JWT token:
POST /api/v1/auth
{
"clientId": "your_client_id_here",
"clientSecret": "your_client_secret_here"
}
curl -X POST "https://developer.youmap.com/api/v1/auth" \
-H "Content-Type: application/json" \
-d '{
"clientId": "your_client_id_here",
"clientSecret": "your_client_secret_here"
}'
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}
const response = await fetch('https://developer.youmap.com/api/v1/auth', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
clientId: 'your_client_id_here',
clientSecret: 'your_client_secret_here'
})
});
const data = await response.json();
const jwtToken = data.token;
// Now use the JWT token for authenticated requests
const mapsResponse = await fetch('https://developer.youmap.com/api/v1/maps', {
headers: {
'Authorization': `Bearer ${jwtToken}`,
'Content-Type': 'application/json'
}
});
https://developer.youmap.com/api/v1
After obtaining your JWT token, include it in the Authorization header for all API requests:
curl -X GET "https://developer.youmap.com/api/v1/maps" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
JWT tokens expire after a certain period (shown in the expiresIn
field). When your
token expires, you'll need to request a new one using the same login endpoint with your clientId and
clientSecret.
Direct access to API specification:
Enter your YouMap account credentials to generate API access keys with full permissions for the public API.
Post Templates (also called "Actions" in the backend) are blueprints that define the structure and fields of posts that users can create on your maps. They act as customizable forms that determine what information users can input when creating posts.
A Post Template is like a form template - you define what fields users can fill out (text, images, ratings, etc.), and users create posts by filling out those fields.
Post Templates use a versioning system where:
version
when updating templatesFeatured fields are special fields that appear prominently in the UI and have strict rules:
MINIMUM: At least 1 field must be featured
MAXIMUM: Only 3 fields can be featured per template
Featured fields appear in post previews. Every template needs at least one featured field.
CRITICAL: Featured fields must have the LOWEST order numbers across ALL field types
When all fields are sorted by their order
property (regardless of field type), all
featured fields must appear first.
Maximum 2 media fields can be featured
If 2 media fields are featured, NO other fields can be featured
This means you can have either: (2 featured media + 0 other featured) OR (0-1 featured media + 1-3 total featured)
All order values must be unique across ALL field types
You cannot have two fields with the same order number, even if they're different field types.
Version must be specified when updating templates
Always include the version
field in your update requests.
Only one date field allowed per template
Date fields have complex validation rules based on their type and duration settings.
Only predefined colors allowed
Templates must use one of the 22 predefined border colors from the allowed list.
Purpose: Single or multi-line text input
Properties:
label
- Display name for the fieldplaceholder
- Hint text for usersrequired
- Whether field must be filledfeatured
- Whether field appears in previewsorder
- Display order within field typePurpose: Image and video uploads
Limitations:
Purpose: Audio file uploads
Validation:
Purpose: URL links with different types
Properties:
linkType
- Type of link (Default, Social, etc.)placeholder
- Example URL formatPurpose: Dropdown or multi-select options
Critical Rules:
Purpose: 1-5 star ratings
Validation:
Purpose: Numeric range selection
Critical Rules:
Purpose: Predefined option selection via slider
Rules:
Purpose: Date/time selection with complex rules
Types:
Date
- Date onlyTime
- Time onlyDateAndTime
- Both date and timeCritical Rules:
Duration | Value | Description | Special Rules |
---|---|---|---|
Forever | 0 | Posts never expire | Default option |
1 Hour | 3600 | Posts expire after 1 hour | - |
1 Day | 86400 | Posts expire after 24 hours | - |
1 Week | 604800 | Posts expire after 7 days | - |
BasedOnDateField | -1 | Posts expire based on date field | Requires date field with allowTimeRanges=true and required=true |
Templates must use one of these predefined border colors:
#8337EC
#E43AFF
#A86EFF
#87A2FB
#64DFDF
#FF006E
#FF63C1
#FF7D00
#FFAB00
#FFCB00
#C0E218
#00D880
#8DCCFC
#4EA6FD
#802AFF
#3E7C17
#29B23F
#1B939F
#342EAD
#8A9297
#4C5F68
#232932
{
"name": "Restaurant Review",
"fields": {
"textFields": [
{
"label": "Review Title",
"featured": true,
"order": 1 // ✅ Featured field with lowest order
},
{
"label": "Additional Notes",
"featured": false,
"order": 4 // ✅ Non-featured with higher order
}
],
"ratingFields": [
{
"label": "Overall Rating",
"featured": true,
"order": 2 // ✅ Featured field with second-lowest order
}
],
"selectFields": [
{
"label": "Meal Type",
"featured": true,
"order": 3 // ✅ Featured field with third-lowest order
}
]
}
}
{
"name": "Restaurant Review",
"emoji": "🍕",
"mapId": 123,
"duration": 0,
"fields": {
"textFields": [
{
"label": "Additional Notes",
"required": false,
"featured": false, // ❌ Non-featured field first
"order": 1
},
{
"label": "Review Title",
"required": true,
"featured": true, // ❌ Featured field after non-featured
"order": 2
}
]
}
}
Error: "Field 'feature:true' should be placed at the first positions on field list"
Creating a template with no featured fields will cause validation errors.
Solution: Ensure at least 1 field is marked as featured.
Placing featured fields after non-featured fields in arrays causes validation errors.
Solution: Always place featured fields first in each field type array.
Setting more than 3 fields as featured will cause validation errors.
Solution: Limit featured fields to your 3 most important ones.
Adding more than 2 media fields per template causes validation errors.
Solution: Limit to maximum 2 media fields per template.
Using colors not in the predefined list causes validation errors.
Solution: Use only colors from the allowed border colors list.