YouMap Public API

Complete documentation for integrating with the YouMap platform

🚀 Getting Started

Overview

YouMap Public API allows you to integrate with our mapping platform to create, manage, and interact with location-based content.

Quick Start

  1. Sign up for an account at YouMap
  2. Generate an API Key in the API Key Management tab
  3. Use your API key to authenticate requests
  4. Start making authenticated requests to our API

Authentication

Include your API key in the X-API-Key header for all API requests:

Example Request

curl -X GET "https://developer.youmap.com/api/v1/maps" \
  -H "X-API-Key: ym_your_api_key_here" \
  -H "Content-Type: application/json"

JavaScript Example

const response = await fetch('https://developer.youmap.com/api/v1/maps', {
  method: 'GET',
  headers: {
    'X-API-Key': 'ym_your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);

Base URL

https://developer.youmap.com/api/v1

Important Security Notes

⚠️ Keep Your API Key Secure

  • Never expose your API key in client-side code or public repositories
  • Store your API key securely - it is only shown once when created
  • If you suspect your key has been compromised, revoke it immediately and create a new one
  • Use environment variables to store your API key in your applications

For Developers & AI Tools

Direct access to API specification:

🔑 API Key Management

Sign In to Manage API Keys

Sign in with your YouMap account to view, create, and manage your API keys.

✅ API Key Created!

⚠️ Important - Save Your Key Now!

This is the only time you will see the full API key. Copy it now and store it securely. You will not be able to see it again.

Usage Example:

📋 Post Templates Guide

What are Post Templates?

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.

💡 Think of it like this:

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.

Key Concepts

🔧 Template vs Post

📝 Versioning System

Post Templates use a versioning system where:

🎯 Featured Fields

Featured fields are special fields that appear prominently in the UI and have strict rules:

🚨 Critical Rules & Limitations

Featured Fields Requirements

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.

🔄 Versioning Requirement

Version must be specified when updating templates

Always include the version field in your update requests.

📅 Date Field Restrictions

Only one date field allowed per template

Date fields have complex validation rules based on their type and duration settings.

🎨 Border Colors

Only predefined colors allowed

Templates must use one of the 22 predefined border colors from the allowed list.

📋 Field Types & Validation Rules

📝 Text Fields

Purpose: Single or multi-line text input

Properties:

  • label - Display name for the field
  • placeholder - Hint text for users
  • required - Whether field must be filled
  • featured - Whether field appears in previews
  • order - Display order within field type

🎵 Audio Fields

Purpose: Audio file uploads

Validation:

  • Only accepts valid audio file IDs
  • Single audio file per field

🔗 Website Fields

Purpose: URL links with different types

Properties:

  • linkType - Type of link (Default, Social, etc.)
  • placeholder - Example URL format

☑️ Select Fields

Purpose: Dropdown or multi-select options

Critical Rules:

  • Options: 2-30 options allowed
  • Option Length: 1-25 characters per option
  • Emoji Consistency: Either ALL options have emojis or NONE do
  • Multiselect: Must specify if multiple selections allowed

❌ Common Errors:

  • Mixed emoji usage (some options with emojis, some without)
  • Too few (<2) or too many (>30) options
  • Option text too long (>25 characters)
  • Missing multiselect specification

⭐ Rating Fields

Purpose: 1-5 star ratings

Validation:

  • Score must be between 1-5
  • Only integer values allowed

🎚️ Value Slider Fields

Purpose: Numeric range selection

Critical Rules:

  • Range Validation: min must be less than max
  • User Input: Selected value must be within defined range

🎛️ Option Slider Fields

Purpose: Predefined option selection via slider

Rules:

  • Options: 2-4 options allowed
  • Option Length: 1-20 characters per option
  • Selection: Index must be valid (0 to options.length-1)

📅 Date Fields

Purpose: Date/time selection with complex rules

Types:

  • Date - Date only
  • Time - Time only
  • DateAndTime - Both date and time

Critical Rules:

  • Duration Dependency: If using "BasedOnDateField" duration, field must allow time ranges and be required
  • Range Restrictions: End dates/times only allowed if allowTimeRanges is true
  • Type Consistency: Field values must match the specified dateType

❌ Common Date Field Errors:

  • Providing end date when allowTimeRanges is false
  • Wrong field combination for dateType (e.g., providing time for Date-only field)
  • Using BasedOnDateField duration without required date field

📊 Duration Types

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

🎨 Allowed Border Colors

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

🛠️ Template Creation Examples

✅ Correct

{
  "name": "Restaurant Review",
  "fields": {
    "textFields": [
      {
        "label": "Review Title",
        "featured": true,
        "order": 1     
      },
      {
        "label": "Additional Notes", 
        "featured": false,
        "order": 4         
      }
    ],
    "ratingFields": [
      {
        "label": "Overall Rating",
        "featured": true,
        "order": 2    
      }
    ],
    "selectFields": [
      {
        "label": "Meal Type",
        "featured": true,
        "order": 3     
      }
    ]
  }
}

❌ Common Mistakes

1. Missing Required Featured Field

Creating a template with no featured fields will cause validation errors.

Solution: Ensure at least 1 field is marked as featured.

2. Too Many Featured Fields

Setting more than 3 fields as featured will cause validation errors.

Solution: Limit featured fields to your 3 most important ones.

3. Invalid Border Color

Using colors not in the predefined list causes validation errors.

Solution: Use only colors from the allowed border colors list.