code: public long create(
  			final String name, final GpsTraceDetails.Visibility visibility,
  			final String description, final List<String> tags,
  			final Iterable<GpsTrackpoint> trackpoints)
  	{
  		checkFieldLength("Name", name);
  		checkFieldLength("Description", description);
  		checkTagsLength(tags);
  		
  		/*
  		 * uploading a new GPX trace works with a multipart/form-data HTML form, we need to cobble 
  		 * together a valid request ourselves here which is why this is a little bit more complex 
  		 * than specifying the parameters simply as URL parameters. But it is not so much more 
  		 * complex, see FormDataWriter class and
  		 * http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
  		 */
  		
  		FormDataWriter writer = new FormDataWriter()
  		{
  			@Override
  			protected void write() throws IOException
  			{
  				ApiRequestWriter trackWriter = new GpxTrackWriter(osm.getUserAgent(), trackpoints);
  				addFileField("file", name, trackWriter);
  				
  				if(tags != null && !tags.isEmpty())
  					addField("tags", toCommaList(tags));
  
  				addField("description", description);
  				addField("visibility", visibility.toString().toLowerCase(Locale.UK));
  			}
  		};
  		
  		return osm.makeAuthenticatedRequest(GPX + "/create", "POST", writer, new IdResponseReader());
  	}
docs: Upload a new trace of trackpoints.
  
  @param name this is usually the "file name" of the GPX trace (when files are involved)
  @param description short description of the trace. May not be null or empty.
  @param tags keywords with which this trace can be found. May be null.
  @return trace id
  
  @throws IllegalArgumentException if either name, description or any single tag is longer than
  255 characters
  @throws OsmBadUserInputException if the trace is invalid
  @throws OsmAuthorizationException if this application is not authorized to write traces
  (Permission.WRITE_GPS_TRACES)